]> git.proxmox.com Git - rustc.git/blame - src/test/ui/return/return-match-array-const.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / return / return-match-array-const.rs
CommitLineData
a7813a04 1fn main() {
136023e0
XL
2//~^ NOTE: not the enclosing function body
3//~| NOTE: not the enclosing function body
4//~| NOTE: not the enclosing function body
60c5eb7d 5 [(); return match 0 { n => n }];
136023e0
XL
6 //~^ ERROR: return statement outside of function body [E0572]
7 //~| NOTE: the return is part of this body...
0531ce1d 8
60c5eb7d 9 [(); return match 0 { 0 => 0 }];
136023e0
XL
10 //~^ ERROR: return statement outside of function body [E0572]
11 //~| NOTE: the return is part of this body...
0531ce1d 12
60c5eb7d 13 [(); return match () { 'a' => 0, _ => 0 }];
136023e0
XL
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 `()`
54a0048b 19}