Skip to content

Commit dcdadc4

Browse files
committed
Remove box syntax from rustc_middle
1 parent 8830f8e commit dcdadc4

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

compiler/rustc_middle/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#![feature(backtrace)]
3030
#![feature(bool_to_option)]
3131
#![feature(box_patterns)]
32-
#![feature(box_syntax)]
3332
#![feature(core_intrinsics)]
3433
#![feature(discriminant_kind)]
3534
#![feature(never_type)]

compiler/rustc_middle/src/mir/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,11 +2061,11 @@ impl<'tcx> Operand<'tcx> {
20612061
span: Span,
20622062
) -> Self {
20632063
let ty = tcx.type_of(def_id).subst(tcx, substs);
2064-
Operand::Constant(box Constant {
2064+
Operand::Constant(Box::new(Constant {
20652065
span,
20662066
user_ty: None,
20672067
literal: ConstantKind::Ty(ty::Const::zero_sized(tcx, ty)),
2068-
})
2068+
}))
20692069
}
20702070

20712071
pub fn is_move(&self) -> bool {
@@ -2092,11 +2092,11 @@ impl<'tcx> Operand<'tcx> {
20922092
};
20932093
scalar_size == type_size
20942094
});
2095-
Operand::Constant(box Constant {
2095+
Operand::Constant(Box::new(Constant {
20962096
span,
20972097
user_ty: None,
20982098
literal: ConstantKind::Val(ConstValue::Scalar(val), ty),
2099-
})
2099+
}))
21002100
}
21012101

21022102
pub fn to_copy(&self) -> Self {

compiler/rustc_middle/src/mir/type_foldable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ impl<'tcx> TypeFoldable<'tcx> for Rvalue<'tcx> {
182182
Len(place) => Len(place.fold_with(folder)),
183183
Cast(kind, op, ty) => Cast(kind, op.fold_with(folder), ty.fold_with(folder)),
184184
BinaryOp(op, box (rhs, lhs)) => {
185-
BinaryOp(op, box (rhs.fold_with(folder), lhs.fold_with(folder)))
185+
BinaryOp(op, Box::new((rhs.fold_with(folder), lhs.fold_with(folder))))
186186
}
187187
CheckedBinaryOp(op, box (rhs, lhs)) => {
188-
CheckedBinaryOp(op, box (rhs.fold_with(folder), lhs.fold_with(folder)))
188+
CheckedBinaryOp(op, Box::new((rhs.fold_with(folder), lhs.fold_with(folder))))
189189
}
190190
UnaryOp(op, val) => UnaryOp(op, val.fold_with(folder)),
191191
Discriminant(place) => Discriminant(place.fold_with(folder)),

0 commit comments

Comments
 (0)