A #[coverage(off|on)] attribute was found in a position where it is not allowed.
Coverage attributes can be applied to:
impl blocks (inherent or trait), and modules.Example of erroneous code:
unsafe extern "C" {
#[coverage(off)]
fn foreign_fn();
} When using the -C instrument-coverage flag, coverage attributes act as a hint to the compiler that it should instrument or not instrument the corresponding function or enclosed functions. The precise effect of applying a coverage attribute is not guaranteed and may change in future compiler versions.
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0788.html