diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/parser/recover-enum2.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/test/ui/parser/recover-enum2.rs b/src/test/ui/parser/recover-enum2.rs new file mode 100644 index 000000000..0c9420889 --- /dev/null +++ b/src/test/ui/parser/recover-enum2.rs @@ -0,0 +1,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 `{` + } + } +} |