]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-19100.fixed
Merge commit 'efa8f5521d3813cc897ba29ea0ef98c7aef66bb6' into rustfmt-subtree
[rust.git] / src / test / ui / issues / issue-19100.fixed
1 // run-pass
2 // run-rustfix
3
4 #![allow(non_snake_case)]
5 #![allow(dead_code)]
6 #![allow(unused_variables)]
7
8 #[derive(Copy, Clone)]
9 enum Foo {
10     Bar,
11     Baz
12 }
13
14 impl Foo {
15     fn foo(&self) {
16         match self {
17             &
18 Foo::Bar if true
19 //~^ WARN pattern binding `Bar` is named the same as one of the variants of the type `Foo`
20 => println!("bar"),
21             &
22 Foo::Baz if false
23 //~^ WARN pattern binding `Baz` is named the same as one of the variants of the type `Foo`
24 => println!("baz"),
25 _ => ()
26         }
27     }
28 }
29
30 fn main() {}