]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/if-let-typo.stderr
Auto merge of #103690 - GuillaumeGomez:visibility-on-demand, r=notriddle
[rust.git] / src / test / ui / suggestions / if-let-typo.stderr
1 error[E0425]: cannot find value `x` in this scope
2   --> $DIR/if-let-typo.rs:4:13
3    |
4 LL |     if Some(x) = foo {}
5    |             ^ not found in this scope
6    |
7 help: you might have meant to use pattern matching
8    |
9 LL |     if let Some(x) = foo {}
10    |        +++
11
12 error[E0425]: cannot find value `x` in this scope
13   --> $DIR/if-let-typo.rs:10:8
14    |
15 LL |     if x = 5 {}
16    |        ^ not found in this scope
17    |
18 help: you might have meant to use pattern matching
19    |
20 LL |     if let x = 5 {}
21    |        +++
22
23 error[E0308]: mismatched types
24   --> $DIR/if-let-typo.rs:4:8
25    |
26 LL |     if Some(x) = foo {}
27    |        ^^^^^^^^^^^^^ expected `bool`, found `()`
28
29 error[E0308]: mismatched types
30   --> $DIR/if-let-typo.rs:6:8
31    |
32 LL |     if Some(foo) = bar {}
33    |        ^^^^^^^^^^^^^^^ expected `bool`, found `()`
34
35 error[E0308]: mismatched types
36   --> $DIR/if-let-typo.rs:7:8
37    |
38 LL |     if 3 = foo {}
39    |        ^^^^^^^ expected `bool`, found `()`
40
41 error[E0070]: invalid left-hand side of assignment
42   --> $DIR/if-let-typo.rs:8:16
43    |
44 LL |     if Some(3) = foo {}
45    |             -  ^
46    |             |
47    |             cannot assign to this expression
48
49 error[E0308]: mismatched types
50   --> $DIR/if-let-typo.rs:8:8
51    |
52 LL |     if Some(3) = foo {}
53    |        ^^^^^^^^^^^^^ expected `bool`, found `()`
54
55 error: aborting due to 7 previous errors
56
57 Some errors have detailed explanations: E0070, E0308, E0425.
58 For more information about an error, try `rustc --explain E0070`.