Files
rust/tests/coverage/attr/module.rs
Travis Cross 879c65ae67 Clean up Reference annotations that drifted
The Reference warns when a `//@ reference:` annotation points to a
rule that isn't in the Reference.  Some of these had accumulated.
Let's clean them up.
2026-10-06 20:32:07 +00:00

38 lines
517 B
Rust

#![feature(coverage_attribute)]
//@ edition: 2021
// Checks that `#[coverage(..)]` can be applied to modules, and is inherited
// by any enclosed functions.
#[coverage(off)]
mod off {
fn inherit() {}
#[coverage(on)]
fn on() {}
#[coverage(off)]
fn off() {}
}
#[coverage(on)]
mod on {
fn inherit() {}
#[coverage(on)]
fn on() {}
#[coverage(off)]
fn off() {}
}
#[coverage(off)]
mod nested_a {
mod nested_b {
fn inner() {}
}
}
#[coverage(off)]
fn main() {}