]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/struct-literal-in-if.stderr
558f5a15cc5b5106345252d1f11c474eb0734985
[rust.git] / src / test / ui / parser / struct-literal-in-if.stderr
1 error: expected type, found `3`
2   --> $DIR/struct-literal-in-if.rs:13:12
3    |
4 LL |         x: 3
5    |            ^ expecting a type here because of type ascription
6    |
7    = note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `<expr>: <type>`
8 note: this expression is annotated with type ascription...
9   --> $DIR/struct-literal-in-if.rs:13:9
10    |
11 LL |         x: 3
12    |         ^
13 note: ...due to this, which is why a type is expected after
14   --> $DIR/struct-literal-in-if.rs:13:10
15    |
16 LL |         x: 3
17    |          ^
18    = help: this might be indicative of a syntax error elsewhere
19
20 error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
21   --> $DIR/struct-literal-in-if.rs:14:12
22    |
23 LL |     }.hi() {
24    |            ^ expected one of `.`, `;`, `?`, `}`, or an operator here
25
26 error[E0423]: expected value, found struct `Foo`
27   --> $DIR/struct-literal-in-if.rs:12:8
28    |
29 LL |     if Foo {
30    |        ^^^ did you mean `(Foo { /* fields */ })`?
31
32 error: aborting due to 3 previous errors
33
34 For more information about this error, try `rustc --explain E0423`.