rust/src/test/ui/parser/struct-literal-in-match-discriminant.stderr

43 lines
1.3 KiB
Plaintext
Raw Normal View History

2018-10-20 15:36:17 -05:00
error: expected one of `=>`, `@`, `if`, or `|`, found `:`
--> $DIR/struct-literal-in-match-discriminant.rs:7:10
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
| ^ expected one of `=>`, `@`, `if`, or `|` here
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `=>`
--> $DIR/struct-literal-in-match-discriminant.rs:11:11
2018-10-20 15:36:17 -05:00
|
2019-03-09 06:03:44 -06:00
LL | } => {}
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-in-match-discriminant.rs:6:11
|
2019-03-09 06:03:44 -06:00
LL | match Foo {
| ^^^ did you mean `(Foo { /* fields */ })`?
error[E0425]: cannot find value `x` in this scope
--> $DIR/struct-literal-in-match-discriminant.rs:10:16
|
2019-03-09 06:03:44 -06:00
LL | x: x
| ^ not found in this scope
error[E0308]: mismatched types
--> $DIR/struct-literal-in-match-discriminant.rs:9:9
|
LL | fn main() {
| - expected `()` because of default return type
...
2019-03-09 06:03:44 -06:00
LL | / Foo {
LL | | x: x
LL | | } => {}
| |_________^ expected (), found struct `Foo`
|
= note: expected type `()`
found type `Foo`
error: aborting due to 5 previous errors
2018-10-20 15:36:17 -05:00
Some errors have detailed explanations: E0308, E0423, E0425.
For more information about an error, try `rustc --explain E0308`.