]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/anon-enums.rs
Auto merge of #105670 - Xiretza:rustc_parse-diagnostics-4, r=davidtwco
[rust.git] / tests / ui / parser / anon-enums.rs
1 fn foo(x: bool | i32) -> i32 | f64 {
2 //~^ ERROR anonymous enums are not supported
3 //~| ERROR anonymous enums are not supported
4     match x {
5         x: i32 => x, //~ ERROR expected
6         true => 42.,
7         false => 0.333,
8     }
9 }
10
11 fn main() {
12     match foo(true) {
13         42: i32 => (), //~ ERROR expected
14         _: f64 => (), //~ ERROR expected
15         x: i32 => (), //~ ERROR expected
16     }
17 }