2021-12-29 06:23:19 -06:00
|
|
|
fn main() {
|
|
|
|
let foo = Some(0);
|
|
|
|
let bar = None;
|
|
|
|
while Some(x) = foo {} //~ ERROR cannot find value `x` in this scope
|
2023-06-07 11:52:53 -05:00
|
|
|
while Some(foo) = bar {} //~ ERROR mismatched types
|
2021-12-29 06:23:19 -06:00
|
|
|
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
|
|
|
|
}
|