rust/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr

29 lines
915 B
Plaintext
Raw Normal View History

2018-10-20 15:36:17 -05:00
error: expected type, found `3`
--> $DIR/struct-literal-restrictions-in-lamda.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
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
--> $DIR/struct-literal-restrictions-in-lamda.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
error[E0423]: expected value, found struct `Foo`
--> $DIR/struct-literal-restrictions-in-lamda.rs:12:14
|
2019-03-09 06:03:44 -06:00
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
|
2019-03-09 06:03:44 -06:00
LL | }.hi() {
| ^^
error: aborting due to 4 previous errors
2018-10-20 15:36:17 -05:00
Some errors occurred: E0423, E0599.
For more information about an error, try `rustc --explain E0423`.