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