Skip to content

Commit c7efe5a

Browse files
committed
Remove box syntax from rustc_typeck
1 parent 4ac2a9f commit c7efe5a

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

compiler/rustc_typeck/src/check/_match.rs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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

compiler/rustc_typeck/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ This API is completely unstable and subject to change.
5858
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
5959
#![cfg_attr(bootstrap, feature(bindings_after_at))]
6060
#![feature(bool_to_option)]
61-
#![feature(box_syntax)]
6261
#![feature(crate_visibility_modifier)]
6362
#![feature(format_args_capture)]
6463
#![feature(in_band_lifetimes)]

0 commit comments

Comments
 (0)