rust/src/test/ui/issues/issue-51714.rs

14 lines
378 B
Rust
Raw Normal View History

fn main() {
2018-07-01 16:40:36 +00:00
|_: [_; return || {}] | {};
//~^ ERROR return statement outside of function body
[(); return || {}];
//~^ ERROR return statement outside of function body
[(); return |ice| {}];
//~^ ERROR return statement outside of function body
2018-07-01 16:40:36 +00:00
[(); return while let Some(n) = Some(0) {}];
//~^ ERROR return statement outside of function body
}