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:13:8
16 | ^ not found in this scope
18 help: you might have meant to use pattern matching
23 error[E0658]: destructuring assignments are unstable
24 --> $DIR/if-let-typo.rs:4:16
26 LL | if Some(x) = foo {}
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:7:18
37 LL | if Some(foo) = bar {}
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[E0658]: destructuring assignments are unstable
46 --> $DIR/if-let-typo.rs:10:16
48 LL | if Some(3) = foo {}
51 | cannot assign to this expression
53 = note: see issue #71126 <https://github.com/rust-lang/rust/issues/71126> for more information
54 = help: add `#![feature(destructuring_assignment)]` to the crate attributes to enable
56 error[E0308]: mismatched types
57 --> $DIR/if-let-typo.rs:4:8
59 LL | if Some(x) = foo {}
60 | ^^^^^^^^^^^^^ expected `bool`, found `()`
62 error[E0308]: mismatched types
63 --> $DIR/if-let-typo.rs:7:8
65 LL | if Some(foo) = bar {}
66 | ^^^^^^^^^^^^^^^ expected `bool`, found `()`
68 error[E0308]: mismatched types
69 --> $DIR/if-let-typo.rs:9:8
72 | ^^^^^^^ expected `bool`, found `()`
74 help: you might have meant to use pattern matching
76 LL | if let 3 = foo {}
79 error[E0070]: invalid left-hand side of assignment
80 --> $DIR/if-let-typo.rs:10:16
82 LL | if Some(3) = foo {}
85 | cannot assign to this expression
87 error[E0308]: mismatched types
88 --> $DIR/if-let-typo.rs:10:8
90 LL | if Some(3) = foo {}
91 | ^^^^^^^^^^^^^ expected `bool`, found `()`
93 error: aborting due to 10 previous errors
95 Some errors have detailed explanations: E0070, E0308, E0425, E0658.
96 For more information about an error, try `rustc --explain E0070`.