|
1 | | -error[E0425]: cannot find value `x` in this scope |
2 | | - --> $DIR/if-let-typo.rs:4:13 |
| 1 | +error: missing `let` |
| 2 | + --> $DIR/if-let-typo.rs:4:8 |
3 | 3 | | |
4 | 4 | LL | if Some(x) = foo {} |
5 | | - | ^ not found in this scope |
| 5 | + | ^^^^^^^------ |
| 6 | + | | |
| 7 | + | expected `let` expression, found assignment |
6 | 8 | | |
7 | | -help: you might have meant to use pattern matching |
| 9 | +help: add `let` before the expression |
8 | 10 | | |
9 | 11 | LL | if let Some(x) = foo {} |
10 | 12 | | +++ |
11 | 13 |
|
12 | | -error[E0425]: cannot find value `x` in this scope |
13 | | - --> $DIR/if-let-typo.rs:10:8 |
| 14 | +error: missing `let` |
| 15 | + --> $DIR/if-let-typo.rs:5:8 |
14 | 16 | | |
15 | | -LL | if x = 5 {} |
16 | | - | ^ not found in this scope |
| 17 | +LL | if Some(foo) = bar {} |
| 18 | + | ^^^^^^^^^------ |
| 19 | + | | |
| 20 | + | expected `let` expression, found assignment |
17 | 21 | | |
18 | | -help: you might have meant to use pattern matching |
| 22 | +help: add `let` before the expression |
19 | 23 | | |
20 | | -LL | if let x = 5 {} |
| 24 | +LL | if let Some(foo) = bar {} |
21 | 25 | | +++ |
22 | 26 |
|
23 | | -error[E0308]: mismatched types |
24 | | - --> $DIR/if-let-typo.rs:4:8 |
| 27 | +error: missing `let` |
| 28 | + --> $DIR/if-let-typo.rs:7:8 |
25 | 29 | | |
26 | | -LL | if Some(x) = foo {} |
27 | | - | ^^^^^^^^^^^^^ expected `bool`, found `()` |
| 30 | +LL | if Some(3) = foo {} |
| 31 | + | ^^^^^^^------ |
| 32 | + | | |
| 33 | + | expected `let` expression, found assignment |
28 | 34 | | |
29 | | -help: consider adding `let` |
| 35 | +help: add `let` before the expression |
30 | 36 | | |
31 | | -LL | if let Some(x) = foo {} |
| 37 | +LL | if let Some(3) = foo {} |
32 | 38 | | +++ |
33 | 39 |
|
34 | | -error[E0308]: mismatched types |
35 | | - --> $DIR/if-let-typo.rs:6:8 |
| 40 | +error[E0425]: cannot find value `x` in this scope |
| 41 | + --> $DIR/if-let-typo.rs:8:8 |
36 | 42 | | |
37 | | -LL | if Some(foo) = bar {} |
38 | | - | ^^^^^^^^^^^^^^^ expected `bool`, found `()` |
| 43 | +LL | if x = 5 {} |
| 44 | + | ^ not found in this scope |
39 | 45 | | |
40 | | -help: consider adding `let` |
| 46 | +help: you might have meant to use pattern matching |
41 | 47 | | |
42 | | -LL | if let Some(foo) = bar {} |
| 48 | +LL | if let x = 5 {} |
43 | 49 | | +++ |
44 | 50 |
|
45 | 51 | error[E0308]: mismatched types |
46 | | - --> $DIR/if-let-typo.rs:7:8 |
| 52 | + --> $DIR/if-let-typo.rs:6:8 |
47 | 53 | | |
48 | 54 | LL | if 3 = foo {} |
49 | 55 | | ^^^^^^^ expected `bool`, found `()` |
50 | 56 |
|
51 | | -error[E0070]: invalid left-hand side of assignment |
52 | | - --> $DIR/if-let-typo.rs:8:16 |
53 | | - | |
54 | | -LL | if Some(3) = foo {} |
55 | | - | - ^ |
56 | | - | | |
57 | | - | cannot assign to this expression |
58 | | - |
59 | | -error[E0308]: mismatched types |
60 | | - --> $DIR/if-let-typo.rs:8:8 |
61 | | - | |
62 | | -LL | if Some(3) = foo {} |
63 | | - | ^^^^^^^^^^^^^ expected `bool`, found `()` |
64 | | - | |
65 | | -help: consider adding `let` |
66 | | - | |
67 | | -LL | if let Some(3) = foo {} |
68 | | - | +++ |
69 | | - |
70 | | -error: aborting due to 7 previous errors |
| 57 | +error: aborting due to 5 previous errors |
71 | 58 |
|
72 | | -Some errors have detailed explanations: E0070, E0308, E0425. |
73 | | -For more information about an error, try `rustc --explain E0070`. |
| 59 | +Some errors have detailed explanations: E0308, E0425. |
| 60 | +For more information about an error, try `rustc --explain E0308`. |
0 commit comments