]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/lint-match-arms.rs
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / lint-match-arms.rs
1 fn deny_on_arm() {
2     match 0 {
3         #[deny(unused_variables)]
4         //~^ NOTE the lint level is defined here
5         y => (),
6         //~^ ERROR unused variable
7     }
8 }
9
10 #[deny(unused_variables)]
11 fn allow_on_arm() {
12     match 0 {
13         #[allow(unused_variables)]
14         y => (), // OK
15     }
16 }
17
18 fn main() {}