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