1 // Test for issue #67776: binding named the same as enum variant
2 // should report an error even when matching against a reference type
4 #![allow(unused_variables)]
5 #![allow(non_snake_case)]
16 //~^ ERROR named the same as one of the variants of the type `Foo`
18 //~^ ERROR named the same as one of the variants of the type `Foo`
25 //~^ ERROR named the same as one of the variants of the type `Foo`
27 //~^ ERROR named the same as one of the variants of the type `Foo`
31 fn fn3(e: &mut &&mut Foo) {
34 //~^ ERROR named the same as one of the variants of the type `Foo`
36 //~^ ERROR named the same as one of the variants of the type `Foo`