blob: 063c0145c85c681984e65f35c49f87bf9aea5ec2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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 `{`
|