diff options
Diffstat (limited to 'tests/ui/parser/recovered-struct-variant.rs')
-rw-r--r-- | tests/ui/parser/recovered-struct-variant.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/parser/recovered-struct-variant.rs b/tests/ui/parser/recovered-struct-variant.rs new file mode 100644 index 000000000..5b195dcc3 --- /dev/null +++ b/tests/ui/parser/recovered-struct-variant.rs @@ -0,0 +1,13 @@ +enum Foo { + A { a, b: usize } + //~^ ERROR expected `:`, found `,` +} + +fn main() { + // no complaints about non-existing fields + let f = Foo::A { a:3, b: 4}; + match f { + // no complaints about non-existing fields + Foo::A {a, b} => {} + } +} |