mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
14 lines
376 B
Rust
14 lines
376 B
Rust
fn main() {
|
|
let container = vec![Some(1), Some(2), None];
|
|
|
|
let mut i = 0;
|
|
while if let Some(thing) = container.get(i) {
|
|
//~^ NOTE while parsing the body of this `while` expression
|
|
//~| NOTE this `while` condition successfully parsed
|
|
println!("{:?}", thing);
|
|
i += 1;
|
|
}
|
|
}
|
|
//~^ ERROR expected `{`, found `}`
|
|
//~| NOTE expected `{`
|