blob: 64ddde0e9e97ff58f410c02d1b90e8eae989420d [file] [log] [blame]
error: expected one of `=>`, `@`, `if`, or `|`, found `:`
--> $DIR/struct-literal-in-match-discriminant.rs:7:10
|
LL | x: 3 //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `:`
| ^ expected one of `=>`, `@`, `if`, or `|` here
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `=>`
--> $DIR/struct-literal-in-match-discriminant.rs:11:11
|
LL | } => {} //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `=>`
| ^^ expected one of `.`, `;`, `?`, `}`, or an operator here
error[E0423]: expected value, found struct `Foo`
--> $DIR/struct-literal-in-match-discriminant.rs:6:11
|
LL | match Foo { //~ ERROR expected value, found struct `Foo`
| ^^^ did you mean `(Foo { /* fields */ })`?
error[E0425]: cannot find value `x` in this scope
--> $DIR/struct-literal-in-match-discriminant.rs:10:16
|
LL | x: x //~ ERROR cannot find value `x` in this scope
| ^ 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
...
LL | / Foo { //~ ERROR mismatched types
LL | | x: x //~ ERROR cannot find value `x` in this scope
LL | | } => {} //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `=>`
| |_________^ expected (), found struct `Foo`
|
= note: expected type `()`
found type `Foo`
error: aborting due to 5 previous errors
Some errors occurred: E0308, E0423, E0425.
For more information about an error, try `rustc --explain E0308`.