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