2018-06-22 17:35:52 -05:00
|
|
|
fn main() {
|
2022-11-21 06:40:27 -06:00
|
|
|
//~^ NOTE: not the enclosing function body
|
|
|
|
//~| NOTE: not the enclosing function body
|
|
|
|
//~| NOTE: not the enclosing function body
|
|
|
|
//~| NOTE: not the enclosing function body
|
|
|
|
|_: [_; return || {}]| {};
|
2021-06-10 18:20:00 -05:00
|
|
|
//~^ ERROR: return statement outside of function body [E0572]
|
|
|
|
//~| NOTE: the return is part of this body...
|
2018-06-22 17:35:52 -05:00
|
|
|
|
|
|
|
[(); return || {}];
|
2021-06-10 18:20:00 -05:00
|
|
|
//~^ ERROR: return statement outside of function body [E0572]
|
|
|
|
//~| NOTE: the return is part of this body...
|
2018-07-01 11:23:48 -05:00
|
|
|
|
|
|
|
[(); return |ice| {}];
|
2021-06-10 18:20:00 -05:00
|
|
|
//~^ ERROR: return statement outside of function body [E0572]
|
|
|
|
//~| NOTE: the return is part of this body...
|
2018-07-01 11:40:36 -05:00
|
|
|
|
|
|
|
[(); return while let Some(n) = Some(0) {}];
|
2021-06-10 18:20:00 -05:00
|
|
|
//~^ ERROR: return statement outside of function body [E0572]
|
|
|
|
//~| NOTE: the return is part of this body...
|
2018-07-01 11:23:48 -05:00
|
|
|
}
|