rust/tests/ui/parser/recovered-struct-variant.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
268 B
Rust
Raw Normal View History

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} => {}
}
}