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...
11 //~^ ERROR: return statement outside of function body [E0572]
12 //~| NOTE: the return is part of this body...
14 [(); return |ice| {}];
15 //~^ ERROR: return statement outside of function body [E0572]
16 //~| NOTE: the return is part of this body...
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...