]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/struct-literal-in-match-discriminant.rs
Rollup merge of #57351 - oli-obk:cheap_const_ops, r=RalfJung
[rust.git] / src / test / ui / parser / struct-literal-in-match-discriminant.rs
1 struct Foo {
2     x: isize,
3 }
4
5 fn main() {
6     match Foo { //~ ERROR expected value, found struct `Foo`
7         x: 3    //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `:`
8     } {
9         Foo { //~ ERROR mismatched types
10             x: x //~ ERROR cannot find value `x` in this scope
11         } => {} //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `=>`
12     }
13 }