fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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