rust/src/test/ui/issues/issue-51714.rs
2018-12-25 21:08:33 -07:00

14 lines
424 B
Rust

fn main() {
|_: [_; 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
[(); return while let Some(n) = Some(0) {}];
//~^ ERROR return statement outside of function body
//~^^ ERROR irrefutable while-let pattern
}