]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr
Rollup merge of #59432 - phansch:compiletest_docs, r=alexcrichton
[rust.git] / src / test / ui / parser / struct-literal-restrictions-in-lamda.stderr
1 error: expected type, found `3`
2   --> $DIR/struct-literal-restrictions-in-lamda.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 expects an ascribed type after the colon
9   --> $DIR/struct-literal-restrictions-in-lamda.rs:13:9
10    |
11 LL |         x: 3
12    |         ^
13    = help: this might be indicative of a syntax error elsewhere
14
15 error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
16   --> $DIR/struct-literal-restrictions-in-lamda.rs:14:12
17    |
18 LL |     }.hi() {
19    |            ^ expected one of `.`, `;`, `?`, `}`, or an operator here
20
21 error[E0423]: expected value, found struct `Foo`
22   --> $DIR/struct-literal-restrictions-in-lamda.rs:12:14
23    |
24 LL |     while || Foo {
25    |              ^^^ did you mean `(Foo { /* fields */ })`?
26
27 error[E0599]: no method named `hi` found for type `()` in the current scope
28   --> $DIR/struct-literal-restrictions-in-lamda.rs:14:7
29    |
30 LL |     }.hi() {
31    |       ^^
32
33 error: aborting due to 4 previous errors
34
35 Some errors occurred: E0423, E0599.
36 For more information about an error, try `rustc --explain E0423`.