]> git.proxmox.com Git - rustc.git/blob - src/test/ui/suggestions/if-let-typo.stderr
New upstream version 1.49.0~beta.4+dfsg1
[rustc.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[E0658]: destructuring assignments are unstable
13 --> $DIR/if-let-typo.rs:4:16
14 |
15 LL | if Some(x) = foo {}
16 | ------- ^
17 | |
18 | cannot assign to this expression
19 |
20 = note: see issue #71126 <https://github.com/rust-lang/rust/issues/71126> for more information
21 = help: add `#![feature(destructuring_assignment)]` to the crate attributes to enable
22
23 error[E0658]: destructuring assignments are unstable
24 --> $DIR/if-let-typo.rs:7:18
25 |
26 LL | if Some(foo) = bar {}
27 | --------- ^
28 | |
29 | cannot assign to this expression
30 |
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
33
34 error[E0658]: destructuring assignments are unstable
35 --> $DIR/if-let-typo.rs:10:16
36 |
37 LL | if Some(3) = foo {}
38 | ------- ^
39 | |
40 | cannot assign to this expression
41 |
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
44
45 error[E0308]: mismatched types
46 --> $DIR/if-let-typo.rs:4:8
47 |
48 LL | if Some(x) = foo {}
49 | ^^^^^^^^^^^^^ expected `bool`, found `()`
50
51 error[E0308]: mismatched types
52 --> $DIR/if-let-typo.rs:7:8
53 |
54 LL | if Some(foo) = bar {}
55 | ^^^^^^^^^^^^^^^ expected `bool`, found `()`
56
57 error[E0308]: mismatched types
58 --> $DIR/if-let-typo.rs:9:8
59 |
60 LL | if 3 = foo {}
61 | ^^^^^^^ expected `bool`, found `()`
62 |
63 help: you might have meant to use pattern matching
64 |
65 LL | if let 3 = foo {}
66 | ^^^
67
68 error[E0070]: invalid left-hand side of assignment
69 --> $DIR/if-let-typo.rs:10:16
70 |
71 LL | if Some(3) = foo {}
72 | - ^
73 | |
74 | cannot assign to this expression
75
76 error[E0308]: mismatched types
77 --> $DIR/if-let-typo.rs:10:8
78 |
79 LL | if Some(3) = foo {}
80 | ^^^^^^^^^^^^^ expected `bool`, found `()`
81
82 error: aborting due to 9 previous errors
83
84 Some errors have detailed explanations: E0070, E0308, E0425, E0658.
85 For more information about an error, try `rustc --explain E0070`.