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 {
151151 let $var $( : $ty) ?;
152152 :: core:: intrinsics:: mir:: __internal_extract_let!( $( $rest) * ) ;
153153 } ,
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+ } ,
154161 // Otherwise, output nothing
155162 (
156163 $stmt: stmt; $( $rest: tt) *
@@ -218,6 +225,28 @@ pub macro __internal_remove_let {
218225 }
219226 }
220227 ) } ,
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+ ) } ,
221250 // Otherwise, keep going
222251 (
223252 {
You can’t perform that action at this time.
0 commit comments