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