If you want to ignore all #[test]-related code, consider using [coverage-helper] crate version 0.2+.
cargo-llvm-cov excludes code contained in the directory named tests from the report by default, so you can also use it instead of coverage-helper crate.
Note:#[coverage(off)] was previously named #[no_coverage]. When using #[no_coverage] in the old nightly, replace feature(coverage_attribute) with feature(no_coverage), coverage(off) with no_coverage, and coverage-helper 0.2+ with coverage-helper 0.1.
Closes #312
See https://github.com/rust-lang/rust/pull/114656 and https://github.com/taiki-e/cargo-llvm-cov/issues/312 for the context.