2019-03-26 19:36:07 -05:00
|
|
|
error: expected type, found `3`
|
|
|
|
--> $DIR/recover-from-bad-variant.rs:7:26
|
|
|
|
|
|
|
|
|
LL | let x = Enum::Foo(a: 3, b: 4);
|
2019-07-17 13:40:36 -05:00
|
|
|
| - ^ expected type
|
|
|
|
| |
|
|
|
|
| tried to parse a type due to this type ascription
|
2019-03-28 21:58:00 -05:00
|
|
|
|
|
2019-07-15 16:23:39 -05:00
|
|
|
= note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
|
2019-07-17 13:40:36 -05:00
|
|
|
= note: for more information, see https://github.com/rust-lang/rust/issues/23416
|
2019-03-26 19:36:07 -05:00
|
|
|
|
|
|
|
error[E0532]: expected tuple struct/variant, found struct variant `Enum::Foo`
|
|
|
|
--> $DIR/recover-from-bad-variant.rs:10:9
|
|
|
|
|
|
2019-09-22 13:27:55 -05:00
|
|
|
LL | Foo { a: usize, b: usize },
|
|
|
|
| -------------------------- `Enum::Foo` defined here
|
|
|
|
...
|
2019-03-26 19:36:07 -05:00
|
|
|
LL | Enum::Foo(a, b) => {}
|
|
|
|
| ^^^^^^^^^ did you mean `Enum::Foo { /* fields */ }`?
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0532`.
|