1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
fn main() { enum Test { Var1, Var2(String), Var3 { abc: {}, //~ ERROR: expected type, found `{` }, } // recover... let a = 1; enum Test2 { Fine, } enum Test3 { StillFine { def: i32, }, } { // fail again enum Test4 { Nope(i32 {}) //~ ERROR: found `{` } } }