]> git.proxmox.com Git - rustc.git/blob - src/test/ui/return/return-match-array-const.rs
New upstream version 1.46.0~beta.2+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
5 [(); return match 0 { 0 => 0 }];
6 //~^ ERROR: return statement outside of function body
7
8 [(); return match () { 'a' => 0, _ => 0 }];
9 //~^ ERROR: return statement outside of function body
10 }