2018-06-22 22:35:52 +00:00
|
|
|
fn main() {
|
2022-11-21 12:40:27 +00: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 23:20:00 +00:00
|
|
|
//~^ ERROR: return statement outside of function body [E0572]
|
|
|
|
//~| NOTE: the return is part of this body...
|
2018-06-22 22:35:52 +00:00
|
|
|
|
|
|
|
[(); return || {}];
|
2021-06-10 23:20:00 +00:00
|
|
|
//~^ ERROR: return statement outside of function body [E0572]
|
|
|
|
//~| NOTE: the return is part of this body...
|
2018-07-01 16:23:48 +00:00
|
|
|
|
|
|
|
[(); return |ice| {}];
|
2021-06-10 23:20:00 +00:00
|
|
|
//~^ ERROR: return statement outside of function body [E0572]
|
|
|
|
//~| NOTE: the return is part of this body...
|
2018-07-01 16:40:36 +00:00
|
|
|
|
|
|
|
[(); return while let Some(n) = Some(0) {}];
|
2021-06-10 23:20:00 +00:00
|
|
|
//~^ ERROR: return statement outside of function body [E0572]
|
|
|
|
//~| NOTE: the return is part of this body...
|
2018-07-01 16:23:48 +00:00
|
|
|
}
|