1 // Can't use unit struct as enum pattern
3 // aux-build:empty-struct.rs
5 extern crate empty_struct;
14 // remove attribute after warning cycle and promoting warnings to errors
19 let xe5 = XE::XEmpty5();
22 Empty2 => () //~ ERROR match bindings cannot shadow tuple structs
25 XEmpty6 => () //~ ERROR match bindings cannot shadow tuple structs
30 //~^ ERROR expected unit struct, unit variant or constant, found tuple variant `E::Empty4`
34 //~^ ERROR expected unit struct, unit variant or constant, found tuple variant `XE::XEmpty5`