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[E0658]: destructuring assignments are unstable
13 --> $DIR/if-let-typo.rs:4:16
15 LL | if Some(x) = foo {}
18 | cannot assign to this expression
20 = note: see issue #71126 <https://github.com/rust-lang/rust/issues/71126> for more information
21 = help: add `#![feature(destructuring_assignment)]` to the crate attributes to enable
23 error[E0658]: destructuring assignments are unstable
24 --> $DIR/if-let-typo.rs:7:18
26 LL | if Some(foo) = bar {}
29 | cannot assign to this expression
31 = note: see issue #71126 <https://github.com/rust-lang/rust/issues/71126> for more information
32 = help: add `#![feature(destructuring_assignment)]` to the crate attributes to enable
34 error[E0658]: destructuring assignments are unstable
35 --> $DIR/if-let-typo.rs:10:16
37 LL | if Some(3) = foo {}
40 | cannot assign to this expression
42 = note: see issue #71126 <https://github.com/rust-lang/rust/issues/71126> for more information
43 = help: add `#![feature(destructuring_assignment)]` to the crate attributes to enable
45 error[E0308]: mismatched types
46 --> $DIR/if-let-typo.rs:4:8
48 LL | if Some(x) = foo {}
49 | ^^^^^^^^^^^^^ expected `bool`, found `()`
51 error[E0308]: mismatched types
52 --> $DIR/if-let-typo.rs:7:8
54 LL | if Some(foo) = bar {}
55 | ^^^^^^^^^^^^^^^ expected `bool`, found `()`
57 error[E0308]: mismatched types
58 --> $DIR/if-let-typo.rs:9:8
61 | ^^^^^^^ expected `bool`, found `()`
63 help: you might have meant to use pattern matching
65 LL | if let 3 = foo {}
68 error[E0070]: invalid left-hand side of assignment
69 --> $DIR/if-let-typo.rs:10:16
71 LL | if Some(3) = foo {}
74 | cannot assign to this expression
76 error[E0308]: mismatched types
77 --> $DIR/if-let-typo.rs:10:8
79 LL | if Some(3) = foo {}
80 | ^^^^^^^^^^^^^ expected `bool`, found `()`
82 error: aborting due to 9 previous errors
84 Some errors have detailed explanations: E0070, E0308, E0425, E0658.
85 For more information about an error, try `rustc --explain E0070`.