]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/while-let-typo.rs
Rollup merge of #100953 - joshtriplett:write-docs, r=Mark-Simulacrum
[rust.git] / src / test / ui / suggestions / while-let-typo.rs
1 fn main() {
2     let foo = Some(0);
3     let bar = None;
4     while Some(x) = foo {} //~ ERROR cannot find value `x` in this scope
5     while Some(foo) = bar {}
6     while 3 = foo {} //~ ERROR mismatched types
7     while Some(3) = foo {} //~ ERROR invalid left-hand side of assignment
8     while x = 5 {} //~ ERROR cannot find value `x` in this scope
9 }