Remove box syntax from rustc_typeck

This commit is contained in:
est31 2021-08-05 04:50:39 +02:00
parent 15672dc695
commit 395e7dfc2a
2 changed files with 4 additions and 5 deletions

View file

@ -108,7 +108,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
0 => (arm_span, ObligationCauseCode::BlockTailExpression(arm.body.hir_id)),
_ => (
expr.span,
ObligationCauseCode::MatchExpressionArm(box MatchExpressionArmCause {
ObligationCauseCode::MatchExpressionArm(Box::new(MatchExpressionArmCause {
arm_span,
scrut_span: scrut.span,
semi_span,
@ -117,7 +117,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
last_ty: prior_arm_ty.unwrap(),
scrut_hir_id: scrut.hir_id,
opt_suggest_box_span,
}),
})),
),
};
let cause = self.cause(span, code);
@ -397,13 +397,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// Finally construct the cause:
self.cause(
error_sp,
ObligationCauseCode::IfExpression(box IfExpressionCause {
ObligationCauseCode::IfExpression(Box::new(IfExpressionCause {
then: then_sp,
else_sp: error_sp,
outer: outer_sp,
semicolon: remove_semicolon,
opt_suggest_box_span,
}),
})),
)
}

View file

@ -58,7 +58,6 @@ This API is completely unstable and subject to change.
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![cfg_attr(bootstrap, feature(bindings_after_at))]
#![feature(bool_to_option)]
#![feature(box_syntax)]
#![feature(crate_visibility_modifier)]
#![feature(format_args_capture)]
#![feature(in_band_lifetimes)]