@@ -209,6 +209,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
209
209
ExprKind :: Closure ( box Closure {
210
210
binder,
211
211
capture_clause,
212
+ constness,
212
213
asyncness,
213
214
movability,
214
215
fn_decl,
@@ -233,6 +234,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
233
234
binder,
234
235
* capture_clause,
235
236
e. id ,
237
+ * constness,
236
238
* movability,
237
239
fn_decl,
238
240
body,
@@ -651,6 +653,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
651
653
fn_decl_span : self . lower_span ( span) ,
652
654
fn_arg_span : None ,
653
655
movability : Some ( hir:: Movability :: Static ) ,
656
+ constness : hir:: Constness :: NotConst ,
654
657
} ) ;
655
658
656
659
hir:: ExprKind :: Closure ( c)
@@ -890,6 +893,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
890
893
binder : & ClosureBinder ,
891
894
capture_clause : CaptureBy ,
892
895
closure_id : NodeId ,
896
+ constness : Const ,
893
897
movability : Movability ,
894
898
decl : & FnDecl ,
895
899
body : & Expr ,
@@ -927,6 +931,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
927
931
fn_decl_span : self . lower_span ( fn_decl_span) ,
928
932
fn_arg_span : Some ( self . lower_span ( fn_arg_span) ) ,
929
933
movability : generator_option,
934
+ constness : self . lower_constness ( constness) ,
930
935
} ) ;
931
936
932
937
hir:: ExprKind :: Closure ( c)
@@ -1041,6 +1046,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1041
1046
fn_decl_span : self . lower_span ( fn_decl_span) ,
1042
1047
fn_arg_span : Some ( self . lower_span ( fn_arg_span) ) ,
1043
1048
movability : None ,
1049
+ constness : hir:: Constness :: NotConst ,
1044
1050
} ) ;
1045
1051
hir:: ExprKind :: Closure ( c)
1046
1052
}
0 commit comments