forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
/
struct-literal-restrictions-in-lamda.stderr
36 lines (31 loc) · 1.23 KB
/
struct-literal-restrictions-in-lamda.stderr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
error: expected type, found `3`
--> $DIR/struct-literal-restrictions-in-lamda.rs:13:12
|
LL | x: 3
| ^ expecting a type here because of type ascription
|
= note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `<expr>: <type>`
note: this expression expects an ascribed type after the colon
--> $DIR/struct-literal-restrictions-in-lamda.rs:13:9
|
LL | x: 3
| ^
= help: this might be indicative of a syntax error elsewhere
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
--> $DIR/struct-literal-restrictions-in-lamda.rs:14:12
|
LL | }.hi() {
| ^ expected one of `.`, `;`, `?`, `}`, or an operator here
error[E0423]: expected value, found struct `Foo`
--> $DIR/struct-literal-restrictions-in-lamda.rs:12:14
|
LL | while || Foo {
| ^^^ did you mean `(Foo { /* fields */ })`?
error[E0599]: no method named `hi` found for type `()` in the current scope
--> $DIR/struct-literal-restrictions-in-lamda.rs:14:7
|
LL | }.hi() {
| ^^
error: aborting due to 4 previous errors
Some errors occurred: E0423, E0599.
For more information about an error, try `rustc --explain E0423`.