1
1
error: no rules expected the token `let`
2
- --> $DIR/feature-gate.rs:64 :15
2
+ --> $DIR/feature-gate.rs:69 :15
3
3
|
4
4
LL | macro_rules! use_expr {
5
5
| --------------------- when calling this macro
@@ -18,7 +18,47 @@ LL | () if let 0 = 1 => {}
18
18
= help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
19
19
20
20
error[E0658]: `if let` guards are experimental
21
- --> $DIR/feature-gate.rs:60:12
21
+ --> $DIR/feature-gate.rs:16:12
22
+ |
23
+ LL | () if true && let 0 = 1 => {}
24
+ | ^^^^^^^^^^^^^^^^^^^^
25
+ |
26
+ = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
27
+ = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
28
+ = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
29
+
30
+ error[E0658]: `if let` guards are experimental
31
+ --> $DIR/feature-gate.rs:20:12
32
+ |
33
+ LL | () if let 0 = 1 && true => {}
34
+ | ^^^^^^^^^^^^^^^^^^^^
35
+ |
36
+ = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
37
+ = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
38
+ = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
39
+
40
+ error[E0658]: `if let` guards are experimental
41
+ --> $DIR/feature-gate.rs:34:12
42
+ |
43
+ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
44
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45
+ |
46
+ = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
47
+ = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
48
+ = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
49
+
50
+ error[E0658]: `if let` guards are experimental
51
+ --> $DIR/feature-gate.rs:42:12
52
+ |
53
+ LL | () if let Range { start: _, end: _ } = (true..true) && false => {}
54
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55
+ |
56
+ = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
57
+ = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
58
+ = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
59
+
60
+ error[E0658]: `if let` guards are experimental
61
+ --> $DIR/feature-gate.rs:65:12
22
62
|
23
63
LL | () if let 0 = 1 => {}
24
64
| ^^^^^^^^^^^^
@@ -55,7 +95,7 @@ LL | () if true && let 0 = 1 => {}
55
95
= help: add `#![feature(let_chains)]` to the crate attributes to enable
56
96
57
97
error[E0658]: `let` expressions in this position are unstable
58
- --> $DIR/feature-gate.rs:19 :15
98
+ --> $DIR/feature-gate.rs:20 :15
59
99
|
60
100
LL | () if let 0 = 1 && true => {}
61
101
| ^^^^^^^^^
@@ -64,7 +104,7 @@ LL | () if let 0 = 1 && true => {}
64
104
= help: add `#![feature(let_chains)]` to the crate attributes to enable
65
105
66
106
error[E0658]: `let` expressions in this position are unstable
67
- --> $DIR/feature-gate.rs:22 :16
107
+ --> $DIR/feature-gate.rs:24 :16
68
108
|
69
109
LL | () if (let 0 = 1) && true => {}
70
110
| ^^^^^^^^^
@@ -73,7 +113,7 @@ LL | () if (let 0 = 1) && true => {}
73
113
= help: add `#![feature(let_chains)]` to the crate attributes to enable
74
114
75
115
error[E0658]: `let` expressions in this position are unstable
76
- --> $DIR/feature-gate.rs:25 :24
116
+ --> $DIR/feature-gate.rs:27 :24
77
117
|
78
118
LL | () if true && (let 0 = 1) => {}
79
119
| ^^^^^^^^^
@@ -82,7 +122,7 @@ LL | () if true && (let 0 = 1) => {}
82
122
= help: add `#![feature(let_chains)]` to the crate attributes to enable
83
123
84
124
error[E0658]: `let` expressions in this position are unstable
85
- --> $DIR/feature-gate.rs:28 :16
125
+ --> $DIR/feature-gate.rs:30 :16
86
126
|
87
127
LL | () if (let 0 = 1) && (let 0 = 1) => {}
88
128
| ^^^^^^^^^
@@ -91,7 +131,7 @@ LL | () if (let 0 = 1) && (let 0 = 1) => {}
91
131
= help: add `#![feature(let_chains)]` to the crate attributes to enable
92
132
93
133
error[E0658]: `let` expressions in this position are unstable
94
- --> $DIR/feature-gate.rs:28 :31
134
+ --> $DIR/feature-gate.rs:30 :31
95
135
|
96
136
LL | () if (let 0 = 1) && (let 0 = 1) => {}
97
137
| ^^^^^^^^^
@@ -100,7 +140,7 @@ LL | () if (let 0 = 1) && (let 0 = 1) => {}
100
140
= help: add `#![feature(let_chains)]` to the crate attributes to enable
101
141
102
142
error[E0658]: `let` expressions in this position are unstable
103
- --> $DIR/feature-gate.rs:32 :15
143
+ --> $DIR/feature-gate.rs:34 :15
104
144
|
105
145
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
106
146
| ^^^^^^^^^
@@ -109,7 +149,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
109
149
= help: add `#![feature(let_chains)]` to the crate attributes to enable
110
150
111
151
error[E0658]: `let` expressions in this position are unstable
112
- --> $DIR/feature-gate.rs:32 :28
152
+ --> $DIR/feature-gate.rs:34 :28
113
153
|
114
154
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
115
155
| ^^^^^^^^^
@@ -118,7 +158,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
118
158
= help: add `#![feature(let_chains)]` to the crate attributes to enable
119
159
120
160
error[E0658]: `let` expressions in this position are unstable
121
- --> $DIR/feature-gate.rs:32 :42
161
+ --> $DIR/feature-gate.rs:34 :42
122
162
|
123
163
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
124
164
| ^^^^^^^^^
@@ -127,7 +167,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
127
167
= help: add `#![feature(let_chains)]` to the crate attributes to enable
128
168
129
169
error[E0658]: `let` expressions in this position are unstable
130
- --> $DIR/feature-gate.rs:32 :55
170
+ --> $DIR/feature-gate.rs:34 :55
131
171
|
132
172
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
133
173
| ^^^^^^^^^
@@ -136,7 +176,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
136
176
= help: add `#![feature(let_chains)]` to the crate attributes to enable
137
177
138
178
error[E0658]: `let` expressions in this position are unstable
139
- --> $DIR/feature-gate.rs:32 :68
179
+ --> $DIR/feature-gate.rs:34 :68
140
180
|
141
181
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
142
182
| ^^^^^^^^^
@@ -145,7 +185,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
145
185
= help: add `#![feature(let_chains)]` to the crate attributes to enable
146
186
147
187
error[E0658]: `let` expressions in this position are unstable
148
- --> $DIR/feature-gate.rs:39 :15
188
+ --> $DIR/feature-gate.rs:42 :15
149
189
|
150
190
LL | () if let Range { start: _, end: _ } = (true..true) && false => {}
151
191
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -154,7 +194,7 @@ LL | () if let Range { start: _, end: _ } = (true..true) && false => {}
154
194
= help: add `#![feature(let_chains)]` to the crate attributes to enable
155
195
156
196
error[E0658]: `let` expressions in this position are unstable
157
- --> $DIR/feature-gate.rs:54 :16
197
+ --> $DIR/feature-gate.rs:59 :16
158
198
|
159
199
LL | use_expr!((let 0 = 1 && 0 == 0));
160
200
| ^^^^^^^^^
@@ -163,14 +203,14 @@ LL | use_expr!((let 0 = 1 && 0 == 0));
163
203
= help: add `#![feature(let_chains)]` to the crate attributes to enable
164
204
165
205
error[E0658]: `let` expressions in this position are unstable
166
- --> $DIR/feature-gate.rs:56 :16
206
+ --> $DIR/feature-gate.rs:61 :16
167
207
|
168
208
LL | use_expr!((let 0 = 1));
169
209
| ^^^^^^^^^
170
210
|
171
211
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
172
212
= help: add `#![feature(let_chains)]` to the crate attributes to enable
173
213
174
- error: aborting due to 19 previous errors
214
+ error: aborting due to 23 previous errors
175
215
176
216
For more information about this error, try `rustc --explain E0658`.
0 commit comments