blob: ed530d53e47a1e0b2394b8f4027ec924f6d1bd42 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 | //@ 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() {}
 |