summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/lint-match-arms.rs
blob: 5c2ccc60e1f4cffe08fdc30f6f34fd203b180aad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fn deny_on_arm() {
    match 0 {
        #[deny(unused_variables)]
        //~^ NOTE the lint level is defined here
        y => (),
        //~^ ERROR unused variable
    }
}

#[deny(unused_variables)]
fn allow_on_arm() {
    match 0 {
        #[allow(unused_variables)]
        y => (), // OK
    }
}

fn main() {}