rust/crates/syntax/test_data/parser/err/0025_nope.rs

32 lines
575 B
Rust
Raw Normal View History

2018-09-08 02:55:09 -05:00
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 `{`
//~^ ERROR: found `{`
}
}
// still recover later
let bad_syntax = _; //~ ERROR: expected expression, found reserved identifier `_`
}