]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-19100.rs
Rollup merge of #104347 - notriddle:notriddle/import-macro-from-self-fixup, r=TaKO8Ki
[rust.git] / tests / ui / issues / issue-19100.rs
1 // run-rustfix
2
3 #![allow(non_snake_case)]
4 #![allow(dead_code)]
5 #![allow(unused_variables)]
6
7 #[derive(Copy, Clone)]
8 enum Foo {
9     Bar,
10     Baz
11 }
12
13 impl Foo {
14     fn foo(&self) {
15         match self {
16             &
17 Bar if true
18 //~^ ERROR pattern binding `Bar` is named the same as one of the variants of the type `Foo`
19 => println!("bar"),
20             &
21 Baz if false
22 //~^ ERROR pattern binding `Baz` is named the same as one of the variants of the type `Foo`
23 => println!("baz"),
24 _ => ()
25         }
26     }
27 }
28
29 fn main() {}