2018-10-20 15:36:17 -05:00
|
|
|
error: expected type, found `3`
|
2019-01-06 09:33:05 -06:00
|
|
|
--> $DIR/struct-literal-in-if.rs:13:12
|
2018-10-20 15:36:17 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | x: 3
|
2018-10-20 15:36:17 -05:00
|
|
|
| ^ expecting a type here because of type ascription
|
2019-03-12 21:27:10 -05:00
|
|
|
|
|
2019-03-19 20:16:55 -05:00
|
|
|
= note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `<expr>: <type>`
|
2019-03-22 22:14:20 -05:00
|
|
|
note: this expression expects an ascribed type after the colon
|
2019-03-12 21:27:10 -05:00
|
|
|
--> $DIR/struct-literal-in-if.rs:13:9
|
|
|
|
|
|
|
|
|
LL | x: 3
|
|
|
|
| ^
|
|
|
|
= help: this might be indicative of a syntax error elsewhere
|
2018-10-20 15:36:17 -05:00
|
|
|
|
|
|
|
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
|
2019-01-06 09:33:05 -06:00
|
|
|
--> $DIR/struct-literal-in-if.rs:14:12
|
2018-10-20 15:36:17 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | }.hi() {
|
2018-10-20 15:36:17 -05:00
|
|
|
| ^ expected one of `.`, `;`, `?`, `}`, or an operator here
|
|
|
|
|
2019-01-06 09:33:05 -06:00
|
|
|
error[E0423]: expected value, found struct `Foo`
|
|
|
|
--> $DIR/struct-literal-in-if.rs:12:8
|
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | if Foo {
|
2019-01-06 09:33:05 -06:00
|
|
|
| ^^^ did you mean `(Foo { /* fields */ })`?
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2018-10-20 15:36:17 -05:00
|
|
|
|
2019-01-06 09:33:05 -06:00
|
|
|
For more information about this error, try `rustc --explain E0423`.
|