@@ -209,6 +209,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
209209 ExprKind :: Closure ( box Closure {
210210 binder,
211211 capture_clause,
212+ constness,
212213 asyncness,
213214 movability,
214215 fn_decl,
@@ -233,6 +234,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
233234 binder,
234235 * capture_clause,
235236 e. id ,
237+ * constness,
236238 * movability,
237239 fn_decl,
238240 body,
@@ -651,6 +653,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
651653 fn_decl_span : self . lower_span ( span) ,
652654 fn_arg_span : None ,
653655 movability : Some ( hir:: Movability :: Static ) ,
656+ constness : hir:: Constness :: NotConst ,
654657 } ) ;
655658
656659 hir:: ExprKind :: Closure ( c)
@@ -890,6 +893,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
890893 binder : & ClosureBinder ,
891894 capture_clause : CaptureBy ,
892895 closure_id : NodeId ,
896+ constness : Const ,
893897 movability : Movability ,
894898 decl : & FnDecl ,
895899 body : & Expr ,
@@ -927,6 +931,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
927931 fn_decl_span : self . lower_span ( fn_decl_span) ,
928932 fn_arg_span : Some ( self . lower_span ( fn_arg_span) ) ,
929933 movability : generator_option,
934+ constness : self . lower_constness ( constness) ,
930935 } ) ;
931936
932937 hir:: ExprKind :: Closure ( c)
@@ -1041,6 +1046,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
10411046 fn_decl_span : self . lower_span ( fn_decl_span) ,
10421047 fn_arg_span : Some ( self . lower_span ( fn_arg_span) ) ,
10431048 movability : None ,
1049+ constness : hir:: Constness :: NotConst ,
10441050 } ) ;
10451051 hir:: ExprKind :: Closure ( c)
10461052 }
0 commit comments