Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 395e7df

Browse files
committed
Remove box syntax from rustc_typeck
1 parent 15672dc commit 395e7df

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

compiler/rustc_typeck/src/check/_match.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
108108
0 => (arm_span, ObligationCauseCode::BlockTailExpression(arm.body.hir_id)),
109109
_ => (
110110
expr.span,
111-
ObligationCauseCode::MatchExpressionArm(box MatchExpressionArmCause {
111+
ObligationCauseCode::MatchExpressionArm(Box::new(MatchExpressionArmCause {
112112
arm_span,
113113
scrut_span: scrut.span,
114114
semi_span,
@@ -117,7 +117,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
117117
last_ty: prior_arm_ty.unwrap(),
118118
scrut_hir_id: scrut.hir_id,
119119
opt_suggest_box_span,
120-
}),
120+
})),
121121
),
122122
};
123123
let cause = self.cause(span, code);
@@ -397,13 +397,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
397397
// Finally construct the cause:
398398
self.cause(
399399
error_sp,
400-
ObligationCauseCode::IfExpression(box IfExpressionCause {
400+
ObligationCauseCode::IfExpression(Box::new(IfExpressionCause {
401401
then: then_sp,
402402
else_sp: error_sp,
403403
outer: outer_sp,
404404
semicolon: remove_semicolon,
405405
opt_suggest_box_span,
406-
}),
406+
})),
407407
)
408408
}
409409

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)