1 #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)]
4 I { field1: bool, field2: usize },
6 K { field: &'static str},
10 if x == E::V { field } {}
11 //~^ ERROR expected value, found struct variant `E::V`
12 //~| ERROR mismatched types
13 if x == E::I { field1: true, field2: 42 } {}
14 //~^ ERROR struct literals are not allowed here
15 if x == E::V { field: false } {}
16 //~^ ERROR struct literals are not allowed here
17 if x == E::J { field: -42 } {}
18 //~^ ERROR struct literals are not allowed here
19 if x == E::K { field: "" } {}
20 //~^ ERROR struct literals are not allowed here
22 //~^ ERROR mismatched types