rust/src/test/ui/array-break-length.rs

12 lines
255 B
Rust
Raw Normal View History

fn main() {
loop {
|_: [_; break]| {} //~ ERROR: `break` outside of a loop
2019-05-12 22:28:26 +01:00
//~^ ERROR mismatched types
}
loop {
|_: [_; continue]| {} //~ ERROR: `continue` outside of a loop
2019-05-12 22:28:26 +01:00
//~^ ERROR mismatched types
}
}