@@ -159,16 +159,18 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
159159 0 => ( arm_span, ObligationCauseCode :: BlockTailExpression ( arm. body . hir_id ) ) ,
160160 _ => (
161161 expr. span ,
162- ObligationCauseCode :: MatchExpressionArm ( box MatchExpressionArmCause {
163- arm_span,
164- scrut_span : scrut. span ,
165- semi_span,
166- source : match_src,
167- prior_arms : other_arms. clone ( ) ,
168- last_ty : prior_arm_ty. unwrap ( ) ,
169- scrut_hir_id : scrut. hir_id ,
170- opt_suggest_box_span,
171- } ) ,
162+ ObligationCauseCode :: MatchExpressionArm ( Box :: new (
163+ MatchExpressionArmCause {
164+ arm_span,
165+ scrut_span : scrut. span ,
166+ semi_span,
167+ source : match_src,
168+ prior_arms : other_arms. clone ( ) ,
169+ last_ty : prior_arm_ty. unwrap ( ) ,
170+ scrut_hir_id : scrut. hir_id ,
171+ opt_suggest_box_span,
172+ } ,
173+ ) ) ,
172174 ) ,
173175 } ;
174176 let cause = self . cause ( span, code) ;
@@ -482,13 +484,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
482484 // Finally construct the cause:
483485 self . cause (
484486 error_sp,
485- ObligationCauseCode :: IfExpression ( box IfExpressionCause {
487+ ObligationCauseCode :: IfExpression ( Box :: new ( IfExpressionCause {
486488 then : then_sp,
487489 else_sp : error_sp,
488490 outer : outer_sp,
489491 semicolon : remove_semicolon,
490492 opt_suggest_box_span,
491- } ) ,
493+ } ) ) ,
492494 )
493495 }
494496
0 commit comments