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