11error: no rules expected the token `let`
2- --> $DIR/feature-gate.rs:64 :15
2+ --> $DIR/feature-gate.rs:69 :15
33 |
44LL | macro_rules! use_expr {
55 | --------------------- when calling this macro
@@ -18,7 +18,47 @@ LL | () if let 0 = 1 => {}
1818 = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
1919
2020error[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
2262 |
2363LL | () if let 0 = 1 => {}
2464 | ^^^^^^^^^^^^
@@ -55,7 +95,7 @@ LL | () if true && let 0 = 1 => {}
5595 = help: add `#![feature(let_chains)]` to the crate attributes to enable
5696
5797error[E0658]: `let` expressions in this position are unstable
58- --> $DIR/feature-gate.rs:19 :15
98+ --> $DIR/feature-gate.rs:20 :15
5999 |
60100LL | () if let 0 = 1 && true => {}
61101 | ^^^^^^^^^
@@ -64,7 +104,7 @@ LL | () if let 0 = 1 && true => {}
64104 = help: add `#![feature(let_chains)]` to the crate attributes to enable
65105
66106error[E0658]: `let` expressions in this position are unstable
67- --> $DIR/feature-gate.rs:22 :16
107+ --> $DIR/feature-gate.rs:24 :16
68108 |
69109LL | () if (let 0 = 1) && true => {}
70110 | ^^^^^^^^^
@@ -73,7 +113,7 @@ LL | () if (let 0 = 1) && true => {}
73113 = help: add `#![feature(let_chains)]` to the crate attributes to enable
74114
75115error[E0658]: `let` expressions in this position are unstable
76- --> $DIR/feature-gate.rs:25 :24
116+ --> $DIR/feature-gate.rs:27 :24
77117 |
78118LL | () if true && (let 0 = 1) => {}
79119 | ^^^^^^^^^
@@ -82,7 +122,7 @@ LL | () if true && (let 0 = 1) => {}
82122 = help: add `#![feature(let_chains)]` to the crate attributes to enable
83123
84124error[E0658]: `let` expressions in this position are unstable
85- --> $DIR/feature-gate.rs:28 :16
125+ --> $DIR/feature-gate.rs:30 :16
86126 |
87127LL | () if (let 0 = 1) && (let 0 = 1) => {}
88128 | ^^^^^^^^^
@@ -91,7 +131,7 @@ LL | () if (let 0 = 1) && (let 0 = 1) => {}
91131 = help: add `#![feature(let_chains)]` to the crate attributes to enable
92132
93133error[E0658]: `let` expressions in this position are unstable
94- --> $DIR/feature-gate.rs:28 :31
134+ --> $DIR/feature-gate.rs:30 :31
95135 |
96136LL | () if (let 0 = 1) && (let 0 = 1) => {}
97137 | ^^^^^^^^^
@@ -100,7 +140,7 @@ LL | () if (let 0 = 1) && (let 0 = 1) => {}
100140 = help: add `#![feature(let_chains)]` to the crate attributes to enable
101141
102142error[E0658]: `let` expressions in this position are unstable
103- --> $DIR/feature-gate.rs:32 :15
143+ --> $DIR/feature-gate.rs:34 :15
104144 |
105145LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
106146 | ^^^^^^^^^
@@ -109,7 +149,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
109149 = help: add `#![feature(let_chains)]` to the crate attributes to enable
110150
111151error[E0658]: `let` expressions in this position are unstable
112- --> $DIR/feature-gate.rs:32 :28
152+ --> $DIR/feature-gate.rs:34 :28
113153 |
114154LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
115155 | ^^^^^^^^^
@@ -118,7 +158,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
118158 = help: add `#![feature(let_chains)]` to the crate attributes to enable
119159
120160error[E0658]: `let` expressions in this position are unstable
121- --> $DIR/feature-gate.rs:32 :42
161+ --> $DIR/feature-gate.rs:34 :42
122162 |
123163LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
124164 | ^^^^^^^^^
@@ -127,7 +167,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
127167 = help: add `#![feature(let_chains)]` to the crate attributes to enable
128168
129169error[E0658]: `let` expressions in this position are unstable
130- --> $DIR/feature-gate.rs:32 :55
170+ --> $DIR/feature-gate.rs:34 :55
131171 |
132172LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
133173 | ^^^^^^^^^
@@ -136,7 +176,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
136176 = help: add `#![feature(let_chains)]` to the crate attributes to enable
137177
138178error[E0658]: `let` expressions in this position are unstable
139- --> $DIR/feature-gate.rs:32 :68
179+ --> $DIR/feature-gate.rs:34 :68
140180 |
141181LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
142182 | ^^^^^^^^^
@@ -145,7 +185,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
145185 = help: add `#![feature(let_chains)]` to the crate attributes to enable
146186
147187error[E0658]: `let` expressions in this position are unstable
148- --> $DIR/feature-gate.rs:39 :15
188+ --> $DIR/feature-gate.rs:42 :15
149189 |
150190LL | () if let Range { start: _, end: _ } = (true..true) && false => {}
151191 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -154,7 +194,7 @@ LL | () if let Range { start: _, end: _ } = (true..true) && false => {}
154194 = help: add `#![feature(let_chains)]` to the crate attributes to enable
155195
156196error[E0658]: `let` expressions in this position are unstable
157- --> $DIR/feature-gate.rs:54 :16
197+ --> $DIR/feature-gate.rs:59 :16
158198 |
159199LL | use_expr!((let 0 = 1 && 0 == 0));
160200 | ^^^^^^^^^
@@ -163,14 +203,14 @@ LL | use_expr!((let 0 = 1 && 0 == 0));
163203 = help: add `#![feature(let_chains)]` to the crate attributes to enable
164204
165205error[E0658]: `let` expressions in this position are unstable
166- --> $DIR/feature-gate.rs:56 :16
206+ --> $DIR/feature-gate.rs:61 :16
167207 |
168208LL | use_expr!((let 0 = 1));
169209 | ^^^^^^^^^
170210 |
171211 = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
172212 = help: add `#![feature(let_chains)]` to the crate attributes to enable
173213
174- error: aborting due to 19 previous errors
214+ error: aborting due to 23 previous errors
175215
176216For more information about this error, try `rustc --explain E0658`.
0 commit comments