]> git.proxmox.com Git - rustc.git/blob - src/test/ui/return/return-match-array-const.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / return / return-match-array-const.rs
1 fn main() {
2 [(); return match 0 { n => n }];
3 //~^ ERROR: return statement outside of function body
4 //~| ERROR: `match` is not allowed in a `const`
5
6 [(); return match 0 { 0 => 0 }];
7 //~^ ERROR: return statement outside of function body
8 //~| ERROR: `match` is not allowed in a `const`
9
10 [(); return match () { 'a' => 0, _ => 0 }];
11 //~^ ERROR: return statement outside of function body
12 //~| ERROR: `match` is not allowed in a `const`
13 }