diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index f91067526b13f28293cfdf94ad9566e9d8bd58d6..0e72e916cc6acec3988d2dab011ebad5381c6d0c 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 da0d2575dcbe3377663318d64b83766be84b48fe..b66995afc6db66c5c57dd54f14eb2ade020a1146 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -2061,11 +2061,11 @@ pub fn function_handle( 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 @@ pub fn const_from_scalar( }; 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 f3124e5bf424ef41897c62e9bd88aea4fb0c7cf0..b2d4a22194c628a25a4cf004e1a215b6a66b204b 100644 --- a/compiler/rustc_middle/src/mir/type_foldable.rs +++ b/compiler/rustc_middle/src/mir/type_foldable.rs @@ -182,10 +182,10 @@ fn super_fold_with>(self, folder: &mut F) -> Self { 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)),