1 error[E0425]: cannot find value `x` in this scope
2 --> $DIR/if-let-typo.rs:4:13
4 LL | if Some(x) = foo {}
5 | ^ not found in this scope
7 help: you might have meant to use pattern matching
9 LL | if let Some(x) = foo {}
12 error[E0425]: cannot find value `x` in this scope
13 --> $DIR/if-let-typo.rs:10:8
16 | ^ not found in this scope
18 help: you might have meant to use pattern matching
23 error[E0308]: mismatched types
24 --> $DIR/if-let-typo.rs:4:8
26 LL | if Some(x) = foo {}
27 | ^^^^^^^^^^^^^ expected `bool`, found `()`
29 help: consider adding `let`
31 LL | if let Some(x) = foo {}
34 error[E0308]: mismatched types
35 --> $DIR/if-let-typo.rs:6:8
37 LL | if Some(foo) = bar {}
38 | ^^^^^^^^^^^^^^^ expected `bool`, found `()`
40 help: consider adding `let`
42 LL | if let Some(foo) = bar {}
45 error[E0308]: mismatched types
46 --> $DIR/if-let-typo.rs:7:8
49 | ^^^^^^^ expected `bool`, found `()`
51 error[E0070]: invalid left-hand side of assignment
52 --> $DIR/if-let-typo.rs:8:16
54 LL | if Some(3) = foo {}
57 | cannot assign to this expression
59 error[E0308]: mismatched types
60 --> $DIR/if-let-typo.rs:8:8
62 LL | if Some(3) = foo {}
63 | ^^^^^^^^^^^^^ expected `bool`, found `()`
65 help: consider adding `let`
67 LL | if let Some(3) = foo {}
70 error: aborting due to 7 previous errors
72 Some errors have detailed explanations: E0070, E0308, E0425.
73 For more information about an error, try `rustc --explain E0070`.