File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,13 @@ pub macro __internal_extract_let {
151
151
let $var $( : $ty) ?;
152
152
:: core:: intrinsics:: mir:: __internal_extract_let!( $( $rest) * ) ;
153
153
} ,
154
+ // Due to #86730, we have to handle const blocks separately
155
+ (
156
+ let $var: ident $( : $ty: ty) ? = const $block: block; $( $rest: tt) *
157
+ ) => {
158
+ let $var $( : $ty) ?;
159
+ :: core:: intrinsics:: mir:: __internal_extract_let!( $( $rest) * ) ;
160
+ } ,
154
161
// Otherwise, output nothing
155
162
(
156
163
$stmt: stmt; $( $rest: tt) *
@@ -218,6 +225,28 @@ pub macro __internal_remove_let {
218
225
}
219
226
}
220
227
) } ,
228
+ // Due to #86730 , we have to handle const blocks separately
229
+ (
230
+ {
231
+ {
232
+ $( $already_parsed: tt) *
233
+ }
234
+ {
235
+ let $var: ident $( : $ty: ty ) ? = const $block: block;
236
+ $( $rest: tt) *
237
+ }
238
+ }
239
+ ) => { :: core:: intrinsics:: mir:: __internal_remove_let!(
240
+ {
241
+ {
242
+ $( $already_parsed) *
243
+ $var = const $block;
244
+ }
245
+ {
246
+ $( $rest) *
247
+ }
248
+ }
249
+ ) } ,
221
250
// Otherwise, keep going
222
251
(
223
252
{
You can’t perform that action at this time.
0 commit comments