@@ -159,16 +159,18 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
159
159
0 => ( arm_span, ObligationCauseCode :: BlockTailExpression ( arm. body . hir_id ) ) ,
160
160
_ => (
161
161
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
+ ) ) ,
172
174
) ,
173
175
} ;
174
176
let cause = self . cause ( span, code) ;
@@ -482,13 +484,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
482
484
// Finally construct the cause:
483
485
self . cause (
484
486
error_sp,
485
- ObligationCauseCode :: IfExpression ( box IfExpressionCause {
487
+ ObligationCauseCode :: IfExpression ( Box :: new ( IfExpressionCause {
486
488
then : then_sp,
487
489
else_sp : error_sp,
488
490
outer : outer_sp,
489
491
semicolon : remove_semicolon,
490
492
opt_suggest_box_span,
491
- } ) ,
493
+ } ) ) ,
492
494
)
493
495
}
494
496
0 commit comments