2018-10-20 15:36:17 -05:00
|
|
|
error: expected one of `=>`, `@`, `if`, or `|`, found `:`
|
2019-01-06 09:33:05 -06:00
|
|
|
--> $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 `=>`
|
2019-01-06 09:33:05 -06:00
|
|
|
--> $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
|
|
|
|
|
2019-01-06 09:33:05 -06:00
|
|
|
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 {
|
2019-01-06 09:33:05 -06:00
|
|
|
| ^^^ 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
|
2019-01-06 09:33:05 -06:00
|
|
|
| ^ 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 | | } => {}
|
2019-01-06 09:33:05 -06:00
|
|
|
| |_________^ 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
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0308, E0423, E0425.
|
2019-01-06 09:33:05 -06:00
|
|
|
For more information about an error, try `rustc --explain E0308`.
|