blob: 21b254054bbc043609ec58fa09bede1cd54cf979 (
plain)
1
2
3
4
5
6
7
8
9
|
fn main() {
let foo = Some(0);
let bar = None;
while Some(x) = foo {} //~ ERROR cannot find value `x` in this scope
while Some(foo) = bar {} //~ ERROR mismatched types
while 3 = foo {} //~ ERROR mismatched types
while Some(3) = foo {} //~ ERROR invalid left-hand side of assignment
while x = 5 {} //~ ERROR cannot find value `x` in this scope
}
|