]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-51714.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-51714.rs
1 fn main() {
2 //~^ NOTE: not the enclosing function body
3 //~| NOTE: not the enclosing function body
4 //~| NOTE: not the enclosing function body
5 //~| NOTE: not the enclosing function body
6 |_: [_; return || {}] | {};
7 //~^ ERROR: return statement outside of function body [E0572]
8 //~| NOTE: the return is part of this body...
9
10 [(); return || {}];
11 //~^ ERROR: return statement outside of function body [E0572]
12 //~| NOTE: the return is part of this body...
13
14 [(); return |ice| {}];
15 //~^ ERROR: return statement outside of function body [E0572]
16 //~| NOTE: the return is part of this body...
17
18 [(); return while let Some(n) = Some(0) {}];
19 //~^ ERROR: return statement outside of function body [E0572]
20 //~| NOTE: the return is part of this body...
21 }