1
Fork 0
rust/src/test/ui/parser/struct-literal-in-match-discriminant.rs

14 lines
389 B
Rust
Raw Normal View History

struct Foo {
x: isize,
}
fn main() {
match Foo { //~ ERROR expected value, found struct `Foo`
2015-03-31 09:10:11 +03:00
x: 3 //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `:`
} {
Foo { //~ ERROR mismatched types
x: x //~ ERROR cannot find value `x` in this scope
} => {} //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `=>`
}
}