]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/lint-match-arms.rs
Merge commit 'cd4810de42c57b64b74dae09c530a4c3a41f87b9' into libgccjit-codegen
[rust.git] / src / test / 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() {}