1 error: invalid `struct` delimiters or `fn` call arguments
2 --> $DIR/recover-from-bad-variant.rs:7:13
4 LL | let x = Enum::Foo(a: 3, b: 4);
5 | ^^^^^^^^^^^^^^^^^^^^^
7 help: if `Enum::Foo` is a struct, use braces as delimiters
9 LL | let x = Enum::Foo { a: 3, b: 4 };
11 help: if `Enum::Foo` is a function, use the arguments directly
13 LL - let x = Enum::Foo(a: 3, b: 4);
14 LL + let x = Enum::Foo(3, 4);
17 error[E0532]: expected tuple struct or tuple variant, found struct variant `Enum::Foo`
18 --> $DIR/recover-from-bad-variant.rs:10:9
20 LL | Foo { a: usize, b: usize },
21 | -------------------------- `Enum::Foo` defined here
23 LL | Enum::Foo(a, b) => {}
24 | ^^^^^^^^^^^^^^^ help: use struct pattern syntax instead: `Enum::Foo { a, b }`
26 error[E0769]: tuple variant `Enum::Bar` written as struct variant
27 --> $DIR/recover-from-bad-variant.rs:12:9
29 LL | Enum::Bar { a, b } => {}
32 help: use the tuple variant pattern syntax instead
34 LL | Enum::Bar(a, b) => {}
37 error: aborting due to 3 previous errors
39 Some errors have detailed explanations: E0532, E0769.
40 For more information about an error, try `rustc --explain E0532`.