]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfc-2294-if-let-guard/feature-gate.stderr
Auto merge of #107241 - clubby789:bootstrap-lto-off, r=simulacrum
[rust.git] / tests / ui / rfc-2294-if-let-guard / feature-gate.stderr
1 error: expected expression, found `let` statement
2   --> $DIR/feature-gate.rs:10:16
3    |
4 LL |         () if (let 0 = 1) => {}
5    |                ^^^
6
7 error: expected expression, found `let` statement
8   --> $DIR/feature-gate.rs:14:18
9    |
10 LL |         () if (((let 0 = 1))) => {}
11    |                  ^^^
12
13 error: expected expression, found `let` statement
14   --> $DIR/feature-gate.rs:26:16
15    |
16 LL |         () if (let 0 = 1) && true => {}
17    |                ^^^
18
19 error: expected expression, found `let` statement
20   --> $DIR/feature-gate.rs:30:24
21    |
22 LL |         () if true && (let 0 = 1) => {}
23    |                        ^^^
24
25 error: expected expression, found `let` statement
26   --> $DIR/feature-gate.rs:34:16
27    |
28 LL |         () if (let 0 = 1) && (let 0 = 1) => {}
29    |                ^^^
30
31 error: expected expression, found `let` statement
32   --> $DIR/feature-gate.rs:34:31
33    |
34 LL |         () if (let 0 = 1) && (let 0 = 1) => {}
35    |                               ^^^
36
37 error: expected expression, found `let` statement
38   --> $DIR/feature-gate.rs:40:42
39    |
40 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
41    |                                          ^^^
42
43 error: expected expression, found `let` statement
44   --> $DIR/feature-gate.rs:40:55
45    |
46 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
47    |                                                       ^^^
48
49 error: expected expression, found `let` statement
50   --> $DIR/feature-gate.rs:40:68
51    |
52 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
53    |                                                                    ^^^
54
55 error: expected expression, found `let` statement
56   --> $DIR/feature-gate.rs:68:16
57    |
58 LL |     use_expr!((let 0 = 1 && 0 == 0));
59    |                ^^^
60
61 error: expected expression, found `let` statement
62   --> $DIR/feature-gate.rs:71:16
63    |
64 LL |     use_expr!((let 0 = 1));
65    |                ^^^
66
67 error: no rules expected the token `let`
68   --> $DIR/feature-gate.rs:80:15
69    |
70 LL |     macro_rules! use_expr {
71    |     --------------------- when calling this macro
72 ...
73 LL |     use_expr!(let 0 = 1);
74    |               ^^^ no rules expected this token in macro call
75    |
76 note: while trying to match meta-variable `$e:expr`
77   --> $DIR/feature-gate.rs:61:10
78    |
79 LL |         ($e:expr) => {
80    |          ^^^^^^^
81
82 error[E0658]: `if let` guards are experimental
83   --> $DIR/feature-gate.rs:7:12
84    |
85 LL |         () if let 0 = 1 => {}
86    |            ^^^^^^^^^^^^
87    |
88    = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
89    = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
90    = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
91
92 error[E0658]: `if let` guards are experimental
93   --> $DIR/feature-gate.rs:18:12
94    |
95 LL |         () if true && let 0 = 1 => {}
96    |            ^^^^^^^^^^^^^^^^^^^^
97    |
98    = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
99    = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
100    = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
101
102 error[E0658]: `if let` guards are experimental
103   --> $DIR/feature-gate.rs:22:12
104    |
105 LL |         () if let 0 = 1 && true => {}
106    |            ^^^^^^^^^^^^^^^^^^^^
107    |
108    = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
109    = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
110    = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
111
112 error[E0658]: `if let` guards are experimental
113   --> $DIR/feature-gate.rs:40:12
114    |
115 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
116    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117    |
118    = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
119    = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
120    = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
121
122 error[E0658]: `if let` guards are experimental
123   --> $DIR/feature-gate.rs:51:12
124    |
125 LL |         () if let Range { start: _, end: _ } = (true..true) && false => {}
126    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127    |
128    = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
129    = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
130    = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
131
132 error[E0658]: `if let` guards are experimental
133   --> $DIR/feature-gate.rs:76:12
134    |
135 LL |         () if let 0 = 1 => {}
136    |            ^^^^^^^^^^^^
137    |
138    = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
139    = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
140    = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
141
142 error[E0658]: `let` expressions in this position are unstable
143   --> $DIR/feature-gate.rs:10:16
144    |
145 LL |         () if (let 0 = 1) => {}
146    |                ^^^^^^^^^
147    |
148    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
149    = help: add `#![feature(let_chains)]` to the crate attributes to enable
150
151 error[E0658]: `let` expressions in this position are unstable
152   --> $DIR/feature-gate.rs:14:18
153    |
154 LL |         () if (((let 0 = 1))) => {}
155    |                  ^^^^^^^^^
156    |
157    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
158    = help: add `#![feature(let_chains)]` to the crate attributes to enable
159
160 error[E0658]: `let` expressions in this position are unstable
161   --> $DIR/feature-gate.rs:18:23
162    |
163 LL |         () if true && let 0 = 1 => {}
164    |                       ^^^^^^^^^
165    |
166    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
167    = help: add `#![feature(let_chains)]` to the crate attributes to enable
168
169 error[E0658]: `let` expressions in this position are unstable
170   --> $DIR/feature-gate.rs:22:15
171    |
172 LL |         () if let 0 = 1 && true => {}
173    |               ^^^^^^^^^
174    |
175    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
176    = help: add `#![feature(let_chains)]` to the crate attributes to enable
177
178 error[E0658]: `let` expressions in this position are unstable
179   --> $DIR/feature-gate.rs:26:16
180    |
181 LL |         () if (let 0 = 1) && true => {}
182    |                ^^^^^^^^^
183    |
184    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
185    = help: add `#![feature(let_chains)]` to the crate attributes to enable
186
187 error[E0658]: `let` expressions in this position are unstable
188   --> $DIR/feature-gate.rs:30:24
189    |
190 LL |         () if true && (let 0 = 1) => {}
191    |                        ^^^^^^^^^
192    |
193    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
194    = help: add `#![feature(let_chains)]` to the crate attributes to enable
195
196 error[E0658]: `let` expressions in this position are unstable
197   --> $DIR/feature-gate.rs:34:16
198    |
199 LL |         () if (let 0 = 1) && (let 0 = 1) => {}
200    |                ^^^^^^^^^
201    |
202    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
203    = help: add `#![feature(let_chains)]` to the crate attributes to enable
204
205 error[E0658]: `let` expressions in this position are unstable
206   --> $DIR/feature-gate.rs:34:31
207    |
208 LL |         () if (let 0 = 1) && (let 0 = 1) => {}
209    |                               ^^^^^^^^^
210    |
211    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
212    = help: add `#![feature(let_chains)]` to the crate attributes to enable
213
214 error[E0658]: `let` expressions in this position are unstable
215   --> $DIR/feature-gate.rs:40:15
216    |
217 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
218    |               ^^^^^^^^^
219    |
220    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
221    = help: add `#![feature(let_chains)]` to the crate attributes to enable
222
223 error[E0658]: `let` expressions in this position are unstable
224   --> $DIR/feature-gate.rs:40:28
225    |
226 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
227    |                            ^^^^^^^^^
228    |
229    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
230    = help: add `#![feature(let_chains)]` to the crate attributes to enable
231
232 error[E0658]: `let` expressions in this position are unstable
233   --> $DIR/feature-gate.rs:40:42
234    |
235 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
236    |                                          ^^^^^^^^^
237    |
238    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
239    = help: add `#![feature(let_chains)]` to the crate attributes to enable
240
241 error[E0658]: `let` expressions in this position are unstable
242   --> $DIR/feature-gate.rs:40:55
243    |
244 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
245    |                                                       ^^^^^^^^^
246    |
247    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
248    = help: add `#![feature(let_chains)]` to the crate attributes to enable
249
250 error[E0658]: `let` expressions in this position are unstable
251   --> $DIR/feature-gate.rs:40:68
252    |
253 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
254    |                                                                    ^^^^^^^^^
255    |
256    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
257    = help: add `#![feature(let_chains)]` to the crate attributes to enable
258
259 error[E0658]: `let` expressions in this position are unstable
260   --> $DIR/feature-gate.rs:51:15
261    |
262 LL |         () if let Range { start: _, end: _ } = (true..true) && false => {}
263    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
264    |
265    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
266    = help: add `#![feature(let_chains)]` to the crate attributes to enable
267
268 error[E0658]: `let` expressions in this position are unstable
269   --> $DIR/feature-gate.rs:68:16
270    |
271 LL |     use_expr!((let 0 = 1 && 0 == 0));
272    |                ^^^^^^^^^
273    |
274    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
275    = help: add `#![feature(let_chains)]` to the crate attributes to enable
276
277 error[E0658]: `let` expressions in this position are unstable
278   --> $DIR/feature-gate.rs:71:16
279    |
280 LL |     use_expr!((let 0 = 1));
281    |                ^^^^^^^^^
282    |
283    = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
284    = help: add `#![feature(let_chains)]` to the crate attributes to enable
285
286 error: aborting due to 34 previous errors
287
288 For more information about this error, try `rustc --explain E0658`.