]>
git.proxmox.com Git - rustc.git/blob - tests/ui/return/return-match-array-const.rs
2 //~^ NOTE: not the enclosing function body
3 //~| NOTE: not the enclosing function body
4 //~| NOTE: not the enclosing function body
5 [(); return match 0 { n => n }
];
6 //~^ ERROR: return statement outside of function body [E0572]
7 //~| NOTE: the return is part of this body...
9 [(); return match 0 { 0 => 0 }
];
10 //~^ ERROR: return statement outside of function body [E0572]
11 //~| NOTE: the return is part of this body...
13 [(); return match () { 'a' => 0, _ => 0 }
];
14 //~^ ERROR: return statement outside of function body [E0572]
15 //~| NOTE: the return is part of this body...
16 //~| ERROR: mismatched types [E0308]
17 //~| NOTE: expected `()`, found `char`
18 //~| NOTE: this expression has type `()`