1 error[E0425]: cannot find value `x` in this scope
2 --> $DIR/while-let-typo.rs:4:16
4 LL | while Some(x) = foo {}
5 | ^ not found in this scope
7 help: you might have meant to use pattern matching
9 LL | while let Some(x) = foo {}
12 error[E0425]: cannot find value `x` in this scope
13 --> $DIR/while-let-typo.rs:8:11
16 | ^ not found in this scope
18 help: you might have meant to use pattern matching
20 LL | while let x = 5 {}
23 error[E0308]: mismatched types
24 --> $DIR/while-let-typo.rs:6:11
27 | ^^^^^^^ expected `bool`, found `()`
29 error[E0070]: invalid left-hand side of assignment
30 --> $DIR/while-let-typo.rs:7:19
32 LL | while Some(3) = foo {}
35 | cannot assign to this expression
37 help: you might have meant to use pattern destructuring
39 LL | while let Some(3) = foo {}
42 error: aborting due to 4 previous errors
44 Some errors have detailed explanations: E0070, E0308, E0425.
45 For more information about an error, try `rustc --explain E0070`.