about summary refs log tree commit diff
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2021-08-05 05:14:53 +0200
committerest31 <MTest31@outlook.com>2021-08-18 09:25:26 +0200
commitdcdadc4d8d905065eaa88245010585cbfbb6cc92 (patch)
treef8af3b2c8a830ca905ba48302df2b7f0372a8ee3
parent8830f8e30c7ce78dc2d895c699460d0fc2c99883 (diff)
downloadrust-dcdadc4d8d905065eaa88245010585cbfbb6cc92.tar.gz
rust-dcdadc4d8d905065eaa88245010585cbfbb6cc92.zip
Remove box syntax from rustc_middle
-rw-r--r--compiler/rustc_middle/src/lib.rs1
-rw-r--r--compiler/rustc_middle/src/mir/mod.rs8
-rw-r--r--compiler/rustc_middle/src/mir/type_foldable.rs4
3 files changed, 6 insertions, 7 deletions
diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs
index f91067526b1..0e72e916cc6 100644
--- a/compiler/rustc_middle/src/lib.rs
+++ b/compiler/rustc_middle/src/lib.rs
@@ -29,7 +29,6 @@
 #![feature(backtrace)]
 #![feature(bool_to_option)]
 #![feature(box_patterns)]
-#![feature(box_syntax)]
 #![feature(core_intrinsics)]
 #![feature(discriminant_kind)]
 #![feature(never_type)]
diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs
index da0d2575dcb..b66995afc6d 100644
--- a/compiler/rustc_middle/src/mir/mod.rs
+++ b/compiler/rustc_middle/src/mir/mod.rs
@@ -2061,11 +2061,11 @@ impl<'tcx> Operand<'tcx> {
         span: Span,
     ) -> Self {
         let ty = tcx.type_of(def_id).subst(tcx, substs);
-        Operand::Constant(box Constant {
+        Operand::Constant(Box::new(Constant {
             span,
             user_ty: None,
             literal: ConstantKind::Ty(ty::Const::zero_sized(tcx, ty)),
-        })
+        }))
     }
 
     pub fn is_move(&self) -> bool {
@@ -2092,11 +2092,11 @@ impl<'tcx> Operand<'tcx> {
             };
             scalar_size == type_size
         });
-        Operand::Constant(box Constant {
+        Operand::Constant(Box::new(Constant {
             span,
             user_ty: None,
             literal: ConstantKind::Val(ConstValue::Scalar(val), ty),
-        })
+        }))
     }
 
     pub fn to_copy(&self) -> Self {
diff --git a/compiler/rustc_middle/src/mir/type_foldable.rs b/compiler/rustc_middle/src/mir/type_foldable.rs
index f3124e5bf42..b2d4a22194c 100644
--- a/compiler/rustc_middle/src/mir/type_foldable.rs
+++ b/compiler/rustc_middle/src/mir/type_foldable.rs
@@ -182,10 +182,10 @@ impl<'tcx> TypeFoldable<'tcx> for Rvalue<'tcx> {
             Len(place) => Len(place.fold_with(folder)),
             Cast(kind, op, ty) => Cast(kind, op.fold_with(folder), ty.fold_with(folder)),
             BinaryOp(op, box (rhs, lhs)) => {
-                BinaryOp(op, box (rhs.fold_with(folder), lhs.fold_with(folder)))
+                BinaryOp(op, Box::new((rhs.fold_with(folder), lhs.fold_with(folder))))
             }
             CheckedBinaryOp(op, box (rhs, lhs)) => {
-                CheckedBinaryOp(op, box (rhs.fold_with(folder), lhs.fold_with(folder)))
+                CheckedBinaryOp(op, Box::new((rhs.fold_with(folder), lhs.fold_with(folder))))
             }
             UnaryOp(op, val) => UnaryOp(op, val.fold_with(folder)),
             Discriminant(place) => Discriminant(place.fold_with(folder)),