about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEduard Burtescu <edy.burt@gmail.com>2015-09-24 18:00:08 +0300
committerEduard Burtescu <edy.burt@gmail.com>2015-09-24 18:00:08 +0300
commitf293ea28b4beb5821feedc862619ec539f742cc3 (patch)
tree4dae59234f4962fa2952b70995967c4792287a52
parent07ca1ab1ec32ac99a61312ec07d66db5f3657040 (diff)
downloadrust-f293ea28b4beb5821feedc862619ec539f742cc3.tar.gz
rust-f293ea28b4beb5821feedc862619ec539f742cc3.zip
Remove the deprecated box(PLACE) syntax.
-rw-r--r--src/liballoc/boxed.rs3
-rw-r--r--src/librustc/middle/cfg/construct.rs3
-rw-r--r--src/librustc/middle/check_const.rs3
-rw-r--r--src/librustc/middle/expr_use_visitor.rs17
-rw-r--r--src/librustc/middle/lang_items.rs1
-rw-r--r--src/librustc/middle/liveness.rs5
-rw-r--r--src/librustc/middle/region.rs3
-rw-r--r--src/librustc_front/fold.rs4
-rw-r--r--src/librustc_front/hir.rs6
-rw-r--r--src/librustc_front/lowering.rs6
-rw-r--r--src/librustc_front/print/pprust.rs15
-rw-r--r--src/librustc_front/util.rs7
-rw-r--r--src/librustc_front/visit.rs3
-rw-r--r--src/librustc_lint/unused.rs2
-rw-r--r--src/librustc_mir/build/expr/as_rvalue.rs2
-rw-r--r--src/librustc_mir/hair.rs2
-rw-r--r--src/librustc_mir/tcx/expr.rs13
-rw-r--r--src/librustc_trans/trans/consts.rs8
-rw-r--r--src/librustc_trans/trans/debuginfo/create_scope_map.rs4
-rw-r--r--src/librustc_trans/trans/expr.rs20
-rw-r--r--src/librustc_typeck/check/mod.rs62
-rw-r--r--src/libsyntax/ast.rs6
-rw-r--r--src/libsyntax/ast_util.rs7
-rw-r--r--src/libsyntax/ext/expand.rs4
-rw-r--r--src/libsyntax/feature_gate.rs6
-rw-r--r--src/libsyntax/fold.rs7
-rw-r--r--src/libsyntax/parse/parser.rs79
-rw-r--r--src/libsyntax/print/pprust.rs21
-rw-r--r--src/libsyntax/visit.rs7
-rw-r--r--src/test/auxiliary/issue-2380.rs2
-rw-r--r--src/test/compile-fail/borrowck-lend-flow-if.rs3
-rw-r--r--src/test/compile-fail/borrowck-lend-flow-loop.rs3
-rw-r--r--src/test/compile-fail/borrowck-lend-flow.rs3
-rw-r--r--src/test/compile-fail/borrowck-loan-in-overloaded-op.rs3
-rw-r--r--src/test/compile-fail/feature-gate-box-expr.rs4
-rw-r--r--src/test/compile-fail/feature-gate-placement-expr.rs4
-rw-r--r--src/test/compile-fail/issue-14084.rs3
-rw-r--r--src/test/compile-fail/moves-based-on-type-tuple.rs3
-rw-r--r--src/test/debuginfo/borrowed-tuple.rs2
-rw-r--r--src/test/debuginfo/box.rs2
-rw-r--r--src/test/debuginfo/destructured-fn-argument.rs2
-rw-r--r--src/test/debuginfo/destructured-local.rs2
-rw-r--r--src/test/parse-fail/parenthesized-box-expr-message.rs19
-rw-r--r--src/test/run-pass/autoderef-method-on-trait.rs2
-rw-r--r--src/test/run-pass/crate-method-reexport-grrrrrrr.rs2
-rw-r--r--src/test/run-pass/issue-10767.rs2
-rw-r--r--src/test/run-pass/issue-2935.rs2
-rw-r--r--src/test/run-pass/new-box-syntax.rs6
-rw-r--r--src/test/run-pass/regions-early-bound-trait-param.rs2
-rw-r--r--src/test/run-pass/trait-object-generics.rs2
50 files changed, 117 insertions, 282 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 4293b4765e1..3239677fc0c 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -80,11 +80,10 @@ use core::raw::{TraitObject};
 /// use std::boxed::HEAP;
 ///
 /// fn main() {
-///     let foo = box(HEAP) 5;
+///     let foo: Box<i32> = in HEAP { 5 };
 ///     let foo = box 5;
 /// }
 /// ```
-#[lang = "exchange_heap"]
 #[unstable(feature = "box_heap",
            reason = "may be renamed; uncertain about custom allocator design",
            issue = "27779")]
diff --git a/src/librustc/middle/cfg/construct.rs b/src/librustc/middle/cfg/construct.rs
index 60aebd9cd42..cc69d0789f8 100644
--- a/src/librustc/middle/cfg/construct.rs
+++ b/src/librustc/middle/cfg/construct.rs
@@ -344,13 +344,12 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
                 self.straightline(expr, pred, [r, l].iter().map(|&e| &**e))
             }
 
-            hir::ExprBox(Some(ref l), ref r) |
             hir::ExprIndex(ref l, ref r) |
             hir::ExprBinary(_, ref l, ref r) => { // NB: && and || handled earlier
                 self.straightline(expr, pred, [l, r].iter().map(|&e| &**e))
             }
 
-            hir::ExprBox(None, ref e) |
+            hir::ExprBox(ref e) |
             hir::ExprAddrOf(_, ref e) |
             hir::ExprCast(ref e, _) |
             hir::ExprUnary(_, ref e) |
diff --git a/src/librustc/middle/check_const.rs b/src/librustc/middle/check_const.rs
index f7bfb6e8a40..c6ff38d0f09 100644
--- a/src/librustc/middle/check_const.rs
+++ b/src/librustc/middle/check_const.rs
@@ -568,8 +568,7 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>,
                             "user-defined operators are not allowed in {}s", v.msg());
             }
         }
-        hir::ExprBox(..) |
-        hir::ExprUnary(hir::UnUniq, _) => {
+        hir::ExprBox(_) => {
             v.add_qualif(ConstQualif::NOT_CONST);
             if v.mode != Mode::Var {
                 span_err!(v.tcx.sess, e.span, E0010,
diff --git a/src/librustc/middle/expr_use_visitor.rs b/src/librustc/middle/expr_use_visitor.rs
index a8eb109398a..9a5b21be728 100644
--- a/src/librustc/middle/expr_use_visitor.rs
+++ b/src/librustc/middle/expr_use_visitor.rs
@@ -280,13 +280,11 @@ impl<'d,'t,'a,'tcx> ExprUseVisitor<'d,'t,'a,'tcx> {
                typer: &'t infer::InferCtxt<'a, 'tcx>)
                -> ExprUseVisitor<'d,'t,'a,'tcx>
     {
-        let result = ExprUseVisitor {
+        ExprUseVisitor {
             typer: typer,
             mc: mc::MemCategorizationContext::new(typer),
             delegate: delegate,
-        };
-
-        result
+        }
     }
 
     pub fn walk_fn(&mut self,
@@ -544,17 +542,8 @@ impl<'d,'t,'a,'tcx> ExprUseVisitor<'d,'t,'a,'tcx> {
                 self.walk_captures(expr)
             }
 
-            hir::ExprBox(ref place, ref base) => {
-                match *place {
-                    Some(ref place) => self.consume_expr(&**place),
-                    None => {}
-                }
+            hir::ExprBox(ref base) => {
                 self.consume_expr(&**base);
-                if place.is_some() {
-                    self.tcx().sess.span_bug(
-                        expr.span,
-                        "box with explicit place remains after expansion");
-                }
             }
         }
     }
diff --git a/src/librustc/middle/lang_items.rs b/src/librustc/middle/lang_items.rs
index b7572d43fbe..85e51512bca 100644
--- a/src/librustc/middle/lang_items.rs
+++ b/src/librustc/middle/lang_items.rs
@@ -341,7 +341,6 @@ lets_do_this! {
     EhUnwindResumeLangItem,          "eh_unwind_resume",        eh_unwind_resume;
     MSVCTryFilterLangItem,           "msvc_try_filter",         msvc_try_filter;
 
-    ExchangeHeapLangItem,            "exchange_heap",           exchange_heap;
     OwnedBoxLangItem,                "owned_box",               owned_box;
 
     PhantomDataItem,                 "phantom_data",            phantom_data;
diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs
index 9bb19bb37d8..37057f3c17e 100644
--- a/src/librustc/middle/liveness.rs
+++ b/src/librustc/middle/liveness.rs
@@ -1147,8 +1147,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
           }
 
           hir::ExprIndex(ref l, ref r) |
-          hir::ExprBinary(_, ref l, ref r) |
-          hir::ExprBox(Some(ref l), ref r) => {
+          hir::ExprBinary(_, ref l, ref r) => {
             let r_succ = self.propagate_through_expr(&**r, succ);
             self.propagate_through_expr(&**l, r_succ)
           }
@@ -1158,7 +1157,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
             e1.as_ref().map_or(succ, |e| self.propagate_through_expr(&**e, succ))
           }
 
-          hir::ExprBox(None, ref e) |
+          hir::ExprBox(ref e) |
           hir::ExprAddrOf(_, ref e) |
           hir::ExprCast(ref e, _) |
           hir::ExprUnary(_, ref e) => {
diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs
index c26982ff5ed..c76cc18395f 100644
--- a/src/librustc/middle/region.rs
+++ b/src/librustc/middle/region.rs
@@ -994,9 +994,6 @@ fn resolve_local(visitor: &mut RegionResolutionVisitor, local: &hir::Local) {
                         visitor, &**subexpr, blk_id);
                 }
             }
-            hir::ExprUnary(hir::UnUniq, ref subexpr) => {
-                record_rvalue_scope_if_borrow_expr(visitor, &**subexpr, blk_id);
-            }
             hir::ExprCast(ref subexpr, _) => {
                 record_rvalue_scope_if_borrow_expr(visitor, &**subexpr, blk_id)
             }
diff --git a/src/librustc_front/fold.rs b/src/librustc_front/fold.rs
index 8ef0b5e6648..c2ce7cd701d 100644
--- a/src/librustc_front/fold.rs
+++ b/src/librustc_front/fold.rs
@@ -1040,8 +1040,8 @@ pub fn noop_fold_expr<T: Folder>(Expr {id, node, span}: Expr, folder: &mut T) ->
     Expr {
         id: folder.new_id(id),
         node: match node {
-            ExprBox(p, e) => {
-                ExprBox(p.map(|e|folder.fold_expr(e)), folder.fold_expr(e))
+            ExprBox(e) => {
+                ExprBox(folder.fold_expr(e))
             }
             ExprVec(exprs) => {
                 ExprVec(exprs.move_map(|x| folder.fold_expr(x)))
diff --git a/src/librustc_front/hir.rs b/src/librustc_front/hir.rs
index 4dfb80cce6d..07756789307 100644
--- a/src/librustc_front/hir.rs
+++ b/src/librustc_front/hir.rs
@@ -491,8 +491,6 @@ pub type BinOp = Spanned<BinOp_>;
 
 #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
 pub enum UnOp {
-    /// The `box` operator
-    UnUniq,
     /// The `*` operator for dereferencing
     UnDeref,
     /// The `!` operator for logical inversion
@@ -595,8 +593,8 @@ impl fmt::Debug for Expr {
 
 #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
 pub enum Expr_ {
-    /// First expr is the place; second expr is the value.
-    ExprBox(Option<P<Expr>>, P<Expr>),
+    /// A `box x` expression.
+    ExprBox(P<Expr>),
     /// An array (`[a, b, c, d]`)
     ExprVec(Vec<P<Expr>>),
     /// A function call
diff --git a/src/librustc_front/lowering.rs b/src/librustc_front/lowering.rs
index 4888ff93c99..4b11e8b91e8 100644
--- a/src/librustc_front/lowering.rs
+++ b/src/librustc_front/lowering.rs
@@ -605,7 +605,6 @@ pub fn lower_constness(c: Constness) -> hir::Constness {
 
 pub fn lower_unop(u: UnOp) -> hir::UnOp {
     match u {
-        UnUniq => hir::UnUniq,
         UnDeref => hir::UnDeref,
         UnNot => hir::UnNot,
         UnNeg => hir::UnNeg,
@@ -694,8 +693,8 @@ pub fn lower_expr(e: &Expr) -> P<hir::Expr> {
     P(hir::Expr {
             id: e.id,
             node: match e.node {
-                ExprBox(ref p, ref e) => {
-                    hir::ExprBox(p.as_ref().map(|e| lower_expr(e)), lower_expr(e))
+                ExprBox(ref e) => {
+                    hir::ExprBox(lower_expr(e))
                 }
                 ExprVec(ref exprs) => {
                     hir::ExprVec(exprs.iter().map(|x| lower_expr(x)).collect())
@@ -818,6 +817,7 @@ pub fn lower_expr(e: &Expr) -> P<hir::Expr> {
                 ExprParen(ref ex) => {
                     return lower_expr(ex);
                 }
+                ExprInPlace(..) |
                 ExprIfLet(..) |
                 ExprWhileLet(..) |
                 ExprForLoop(..) |
diff --git a/src/librustc_front/print/pprust.rs b/src/librustc_front/print/pprust.rs
index 6f2ef8e8cbc..e9508009d9d 100644
--- a/src/librustc_front/print/pprust.rs
+++ b/src/librustc_front/print/pprust.rs
@@ -1182,16 +1182,6 @@ impl<'a> State<'a> {
         Ok(())
     }
 
-    fn print_expr_box(&mut self,
-                      place: &Option<P<hir::Expr>>,
-                      expr: &hir::Expr) -> io::Result<()> {
-        try!(word(&mut self.s, "box"));
-        try!(word(&mut self.s, "("));
-        try!(place.as_ref().map_or(Ok(()), |e|self.print_expr(&**e)));
-        try!(self.word_space(")"));
-        self.print_expr(expr)
-    }
-
     fn print_expr_vec(&mut self, exprs: &[P<hir::Expr>]) -> io::Result<()> {
         try!(self.ibox(indent_unit));
         try!(word(&mut self.s, "["));
@@ -1311,8 +1301,9 @@ impl<'a> State<'a> {
         try!(self.ibox(indent_unit));
         try!(self.ann.pre(self, NodeExpr(expr)));
         match expr.node {
-            hir::ExprBox(ref place, ref expr) => {
-                try!(self.print_expr_box(place, &**expr));
+            hir::ExprBox(ref expr) => {
+                try!(self.word_space("box"));
+                try!(self.print_expr(expr));
             }
             hir::ExprVec(ref exprs) => {
                 try!(self.print_expr_vec(&exprs[..]));
diff --git a/src/librustc_front/util.rs b/src/librustc_front/util.rs
index 00abb14d40f..4d1a34621d0 100644
--- a/src/librustc_front/util.rs
+++ b/src/librustc_front/util.rs
@@ -128,10 +128,9 @@ pub fn is_by_value_unop(u: UnOp) -> bool {
 
 pub fn unop_to_string(op: UnOp) -> &'static str {
     match op {
-      UnUniq => "box() ",
-      UnDeref => "*",
-      UnNot => "!",
-      UnNeg => "-",
+        UnDeref => "*",
+        UnNot => "!",
+        UnNeg => "-",
     }
 }
 
diff --git a/src/librustc_front/visit.rs b/src/librustc_front/visit.rs
index f2a756ed390..1453b1b1bc2 100644
--- a/src/librustc_front/visit.rs
+++ b/src/librustc_front/visit.rs
@@ -722,8 +722,7 @@ pub fn walk_exprs<'v, V: Visitor<'v>>(visitor: &mut V, expressions: &'v [P<Expr>
 
 pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
     match expression.node {
-        ExprBox(ref place, ref subexpression) => {
-            place.as_ref().map(|e|visitor.visit_expr(&**e));
+        ExprBox(ref subexpression) => {
             visitor.visit_expr(&**subexpression)
         }
         ExprVec(ref subexpressions) => {
diff --git a/src/librustc_lint/unused.rs b/src/librustc_lint/unused.rs
index 6df32f53d81..f9f3e3a4308 100644
--- a/src/librustc_lint/unused.rs
+++ b/src/librustc_lint/unused.rs
@@ -442,7 +442,7 @@ impl LintPass for UnusedAllocation {
 impl LateLintPass for UnusedAllocation {
     fn check_expr(&mut self, cx: &LateContext, e: &hir::Expr) {
         match e.node {
-            hir::ExprUnary(hir::UnUniq, _) => (),
+            hir::ExprBox(_) => {}
             _ => return
         }
 
diff --git a/src/librustc_mir/build/expr/as_rvalue.rs b/src/librustc_mir/build/expr/as_rvalue.rs
index d03028ffea6..0f0303525e3 100644
--- a/src/librustc_mir/build/expr/as_rvalue.rs
+++ b/src/librustc_mir/build/expr/as_rvalue.rs
@@ -67,7 +67,7 @@ impl<H:Hair> Builder<H> {
                 let arg = unpack!(block = this.as_operand(block, arg));
                 block.and(Rvalue::UnaryOp(op, arg))
             }
-            ExprKind::Box { place: _, value } => {
+            ExprKind::Box { value } => {
                 let value = this.hir.mirror(value);
                 let value_ty = value.ty.clone();
                 let result = this.temp(value_ty.clone());
diff --git a/src/librustc_mir/hair.rs b/src/librustc_mir/hair.rs
index f1450522dd8..823958fdab4 100644
--- a/src/librustc_mir/hair.rs
+++ b/src/librustc_mir/hair.rs
@@ -171,7 +171,7 @@ pub struct Expr<H:Hair> {
 #[derive(Clone, Debug)]
 pub enum ExprKind<H:Hair> {
     Scope { extent: H::CodeExtent, value: ExprRef<H> },
-    Box { place: Option<ExprRef<H>>, value: ExprRef<H> },
+    Box { value: ExprRef<H> },
     Call { fun: ExprRef<H>, args: Vec<ExprRef<H>> },
     Deref { arg: ExprRef<H> }, // NOT overloaded!
     Binary { op: BinOp, lhs: ExprRef<H>, rhs: ExprRef<H> }, // NOT overloaded!
diff --git a/src/librustc_mir/tcx/expr.rs b/src/librustc_mir/tcx/expr.rs
index 78f23fcd71c..94e8b57a587 100644
--- a/src/librustc_mir/tcx/expr.rs
+++ b/src/librustc_mir/tcx/expr.rs
@@ -140,11 +140,6 @@ impl<'a,'tcx:'a> Mirror<Cx<'a,'tcx>> for &'tcx hir::Expr {
                 }
             }
 
-            hir::ExprUnary(hir::UnOp::UnUniq, ref arg) => {
-                assert!(!cx.tcx.is_method_call(self.id));
-                ExprKind::Box { place: None, value: arg.to_ref() }
-            }
-
             hir::ExprUnary(op, ref arg) => {
                 if cx.tcx.is_method_call(self.id) {
                     overloaded_operator(cx, self, ty::MethodCall::expr(self.id),
@@ -154,10 +149,10 @@ impl<'a,'tcx:'a> Mirror<Cx<'a,'tcx>> for &'tcx hir::Expr {
                     let op = match op {
                         hir::UnOp::UnNot => UnOp::Not,
                         hir::UnOp::UnNeg => UnOp::Neg,
-                        hir::UnOp::UnUniq | hir::UnOp::UnDeref => {
+                        hir::UnOp::UnDeref => {
                             cx.tcx.sess.span_bug(
                                 self.span,
-                                &format!("operator should have been handled elsewhere {:?}", op));
+                                "UnDeref should have been handled elsewhere");
                         }
                     };
                     ExprKind::Unary { op: op, arg: arg.to_ref() }
@@ -296,8 +291,8 @@ impl<'a,'tcx:'a> Mirror<Cx<'a,'tcx>> for &'tcx hir::Expr {
                                   name: Field::Indexed(ident.node) },
             hir::ExprCast(ref source, _) =>
                 ExprKind::Cast { source: source.to_ref() },
-            hir::ExprBox(ref place, ref value) =>
-                ExprKind::Box { place: place.to_ref(), value: value.to_ref() },
+            hir::ExprBox(ref value) =>
+                ExprKind::Box { value: value.to_ref() },
             hir::ExprVec(ref fields) =>
                 ExprKind::Vec { fields: fields.to_ref() },
             hir::ExprTup(ref fields) =>
diff --git a/src/librustc_trans/trans/consts.rs b/src/librustc_trans/trans/consts.rs
index ccf602126eb..f8b8c41a034 100644
--- a/src/librustc_trans/trans/consts.rs
+++ b/src/librustc_trans/trans/consts.rs
@@ -564,10 +564,10 @@ fn const_expr_unadjusted<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
 
             let is_float = ty.is_fp();
             unsafe { match u {
-                hir::UnUniq | hir::UnDeref => const_deref(cx, te, ty).0,
-                hir::UnNot                 => llvm::LLVMConstNot(te),
-                hir::UnNeg if is_float     => llvm::LLVMConstFNeg(te),
-                hir::UnNeg                 => llvm::LLVMConstNeg(te),
+                hir::UnDeref           => const_deref(cx, te, ty).0,
+                hir::UnNot             => llvm::LLVMConstNot(te),
+                hir::UnNeg if is_float => llvm::LLVMConstFNeg(te),
+                hir::UnNeg             => llvm::LLVMConstNeg(te),
             } }
         },
         hir::ExprField(ref base, field) => {
diff --git a/src/librustc_trans/trans/debuginfo/create_scope_map.rs b/src/librustc_trans/trans/debuginfo/create_scope_map.rs
index 82808680049..313ff7cd37d 100644
--- a/src/librustc_trans/trans/debuginfo/create_scope_map.rs
+++ b/src/librustc_trans/trans/debuginfo/create_scope_map.rs
@@ -325,9 +325,7 @@ fn walk_expr(cx: &CrateContext,
         hir::ExprTupField(ref sub_exp, _) =>
             walk_expr(cx, &**sub_exp, scope_stack, scope_map),
 
-        hir::ExprBox(ref place, ref sub_expr) => {
-            place.as_ref().map(
-                |e| walk_expr(cx, &**e, scope_stack, scope_map));
+        hir::ExprBox(ref sub_expr) => {
             walk_expr(cx, &**sub_expr, scope_stack, scope_map);
         }
 
diff --git a/src/librustc_trans/trans/expr.rs b/src/librustc_trans/trans/expr.rs
index f2dcf84d419..35686ebaa96 100644
--- a/src/librustc_trans/trans/expr.rs
+++ b/src/librustc_trans/trans/expr.rs
@@ -673,7 +673,7 @@ fn trans_datum_unadjusted<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
         hir::ExprIndex(ref base, ref idx) => {
             trans_index(bcx, expr, &**base, &**idx, MethodCall::expr(expr.id))
         }
-        hir::ExprBox(_, ref contents) => {
+        hir::ExprBox(ref contents) => {
             // Special case for `Box<T>`
             let box_ty = expr_ty(bcx, expr);
             let contents_ty = expr_ty(bcx, &**contents);
@@ -1649,9 +1649,6 @@ fn trans_unary<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
             };
             immediate_rvalue_bcx(bcx, llneg, un_ty).to_expr_datumblock()
         }
-        hir::UnUniq => {
-            trans_uniq_expr(bcx, expr, un_ty, sub_expr, expr_ty(bcx, sub_expr))
-        }
         hir::UnDeref => {
             let datum = unpack_datum!(bcx, trans(bcx, sub_expr));
             deref_once(bcx, expr, datum, method_call)
@@ -2769,24 +2766,11 @@ fn expr_kind(tcx: &ty::ctxt, expr: &hir::Expr) -> ExprKind {
 
         hir::ExprLit(_) | // Note: LitStr is carved out above
         hir::ExprUnary(..) |
-        hir::ExprBox(None, _) |
+        hir::ExprBox(_) |
         hir::ExprAddrOf(..) |
         hir::ExprBinary(..) |
         hir::ExprCast(..) => {
             ExprKind::RvalueDatum
         }
-
-        hir::ExprBox(Some(ref place), _) => {
-            // Special case `Box<T>` for now:
-            let def_id = match tcx.def_map.borrow().get(&place.id) {
-                Some(def) => def.def_id(),
-                None => panic!("no def for place"),
-            };
-            if tcx.lang_items.exchange_heap() == Some(def_id) {
-                ExprKind::RvalueDatum
-            } else {
-                ExprKind::RvalueDps
-            }
-        }
     }
 }
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index 47ddbfdb8cc..dec2e49272b 100644
--- a/src/librustc_typeck/check/mod.rs
+++ b/src/librustc_typeck/check/mod.rs
@@ -3212,31 +3212,16 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
     let tcx = fcx.ccx.tcx;
     let id = expr.id;
     match expr.node {
-      hir::ExprBox(ref opt_place, ref subexpr) => {
-          opt_place.as_ref().map(|place|check_expr(fcx, &**place));
-          check_expr(fcx, &**subexpr);
-
-          let mut checked = false;
-          opt_place.as_ref().map(|place| match place.node {
-              hir::ExprPath(None, ref path) => {
-                  // FIXME(pcwalton): For now we hardcode the only permissible
-                  // place: the exchange heap.
-                  let definition = lookup_full_def(tcx, path.span, place.id);
-                  let def_id = definition.def_id();
-                  let referent_ty = fcx.expr_ty(&**subexpr);
-                  if tcx.lang_items.exchange_heap() == Some(def_id) {
-                      fcx.write_ty(id, tcx.mk_box(referent_ty));
-                      checked = true
-                  }
-              }
-              _ => {}
-          });
-
-          if !checked {
-              span_err!(tcx.sess, expr.span, E0066,
-                  "only the exchange heap is currently supported");
-              fcx.write_ty(id, tcx.types.err);
-          }
+      hir::ExprBox(ref subexpr) => {
+        let expected_inner = expected.to_option(fcx).map_or(NoExpectation, |ty| {
+            match ty.sty {
+                ty::TyBox(ty) => Expectation::rvalue_hint(tcx, ty),
+                _ => NoExpectation
+            }
+        });
+        check_expr_with_expectation(fcx, subexpr, expected_inner);
+        let referent_ty = fcx.expr_ty(&**subexpr);
+        fcx.write_ty(id, tcx.mk_box(referent_ty));
       }
 
       hir::ExprLit(ref lit) => {
@@ -3250,24 +3235,14 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
         op::check_binop_assign(fcx, expr, op, lhs, rhs);
       }
       hir::ExprUnary(unop, ref oprnd) => {
-        let expected_inner = expected.to_option(fcx).map_or(NoExpectation, |ty| {
-            match unop {
-                hir::UnUniq => match ty.sty {
-                    ty::TyBox(ty) => {
-                        Expectation::rvalue_hint(tcx, ty)
-                    }
-                    _ => {
-                        NoExpectation
-                    }
-                },
-                hir::UnNot | hir::UnNeg => {
-                    expected
-                }
-                hir::UnDeref => {
-                    NoExpectation
-                }
+        let expected_inner = match unop {
+            hir::UnNot | hir::UnNeg => {
+                expected
             }
-        });
+            hir::UnDeref => {
+                NoExpectation
+            }
+        };
         let lvalue_pref = match unop {
             hir::UnDeref => lvalue_pref,
             _ => NoPreference
@@ -3278,9 +3253,6 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
 
         if !oprnd_t.references_error() {
             match unop {
-                hir::UnUniq => {
-                    oprnd_t = tcx.mk_box(oprnd_t);
-                }
                 hir::UnDeref => {
                     oprnd_t = structurally_resolved_type(fcx, expr.span, oprnd_t);
                     oprnd_t = match oprnd_t.builtin_deref(true, NoPreference) {
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 62eb6022d0c..db7d77e5454 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -680,8 +680,6 @@ pub type BinOp = Spanned<BinOp_>;
 
 #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
 pub enum UnOp {
-    /// The `box` operator
-    UnUniq,
     /// The `*` operator for dereferencing
     UnDeref,
     /// The `!` operator for logical inversion
@@ -799,8 +797,10 @@ impl fmt::Debug for Expr {
 
 #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
 pub enum Expr_ {
+    /// A `box x` expression.
+    ExprBox(P<Expr>),
     /// First expr is the place; second expr is the value.
-    ExprBox(Option<P<Expr>>, P<Expr>),
+    ExprInPlace(P<Expr>, P<Expr>),
     /// An array (`[a, b, c, d]`)
     ExprVec(Vec<P<Expr>>),
     /// A function call
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs
index d024ff117f5..545c69cafff 100644
--- a/src/libsyntax/ast_util.rs
+++ b/src/libsyntax/ast_util.rs
@@ -101,10 +101,9 @@ pub fn is_by_value_unop(u: UnOp) -> bool {
 
 pub fn unop_to_string(op: UnOp) -> &'static str {
     match op {
-      UnUniq => "box() ",
-      UnDeref => "*",
-      UnNot => "!",
-      UnNeg => "-",
+        UnDeref => "*",
+        UnNot => "!",
+        UnNeg => "-",
     }
 }
 
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 6e0fbbec770..e14e48c022d 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -94,8 +94,8 @@ pub fn expand_expr(e: P<ast::Expr>, fld: &mut MacroExpander) -> P<ast::Expr> {
             })
         }
 
-        // Desugar ExprBox: `in (PLACE) EXPR`
-        ast::ExprBox(Some(placer), value_expr) => {
+        // Desugar ExprInPlace: `in PLACE { EXPR }`
+        ast::ExprInPlace(placer, value_expr) => {
             // to:
             //
             // let p = PLACE;
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index be95b58bf88..eaf964a3c64 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -707,11 +707,11 @@ impl<'a, 'v> Visitor<'v> for MacroVisitor<'a> {
         // But we keep these checks as a pre-expansion check to catch
         // uses in e.g. conditionalized code.
 
-        if let ast::ExprBox(None, _) = e.node {
+        if let ast::ExprBox(_) = e.node {
             self.context.gate_feature("box_syntax", e.span, EXPLAIN_BOX_SYNTAX);
         }
 
-        if let ast::ExprBox(Some(_), _) = e.node {
+        if let ast::ExprInPlace(..) = e.node {
             self.context.gate_feature("placement_in_syntax", e.span, EXPLAIN_PLACEMENT_IN);
         }
 
@@ -860,7 +860,7 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
 
     fn visit_expr(&mut self, e: &ast::Expr) {
         match e.node {
-            ast::ExprBox(..) | ast::ExprUnary(ast::UnOp::UnUniq, _) => {
+            ast::ExprBox(_) => {
                 self.gate_feature("box_syntax",
                                   e.span,
                                   "box expression syntax is experimental; \
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs
index e97c763ca4c..914b08265fe 100644
--- a/src/libsyntax/fold.rs
+++ b/src/libsyntax/fold.rs
@@ -1188,8 +1188,11 @@ pub fn noop_fold_expr<T: Folder>(Expr {id, node, span}: Expr, folder: &mut T) ->
     Expr {
         id: folder.new_id(id),
         node: match node {
-            ExprBox(p, e) => {
-                ExprBox(p.map(|e|folder.fold_expr(e)), folder.fold_expr(e))
+            ExprBox(e) => {
+                ExprBox(folder.fold_expr(e))
+            }
+            ExprInPlace(p, e) => {
+                ExprInPlace(folder.fold_expr(p), folder.fold_expr(e))
             }
             ExprVec(exprs) => {
                 ExprVec(exprs.move_map(|x| folder.fold_expr(x)))
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 6220bd6fa6f..60e0f2d32a4 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -22,7 +22,7 @@ use ast::{Decl, DeclItem, DeclLocal, DefaultBlock, DefaultReturn};
 use ast::{UnDeref, BiDiv, EMPTY_CTXT, EnumDef, ExplicitSelf};
 use ast::{Expr, Expr_, ExprAddrOf, ExprMatch, ExprAgain};
 use ast::{ExprAssign, ExprAssignOp, ExprBinary, ExprBlock, ExprBox};
-use ast::{ExprBreak, ExprCall, ExprCast};
+use ast::{ExprBreak, ExprCall, ExprCast, ExprInPlace};
 use ast::{ExprField, ExprTupField, ExprClosure, ExprIf, ExprIfLet, ExprIndex};
 use ast::{ExprLit, ExprLoop, ExprMac, ExprRange};
 use ast::{ExprMethodCall, ExprParen, ExprPath};
@@ -54,7 +54,7 @@ use ast::{TupleVariantKind, Ty, Ty_, TypeBinding};
 use ast::{TyMac};
 use ast::{TyFixedLengthVec, TyBareFn, TyTypeof, TyInfer};
 use ast::{TyParam, TyParamBound, TyParen, TyPath, TyPolyTraitRef, TyPtr};
-use ast::{TyRptr, TyTup, TyU32, TyVec, UnUniq};
+use ast::{TyRptr, TyTup, TyU32, TyVec};
 use ast::{TypeImplItem, TypeTraitItem};
 use ast::{UnnamedField, UnsafeBlock};
 use ast::{ViewPath, ViewPathGlob, ViewPathList, ViewPathSimple};
@@ -2617,76 +2617,19 @@ impl<'a> Parser<'a> {
             hi = e.span.hi;
             ex = ExprAddrOf(m, e);
           }
-          token::Ident(_, _) => {
-            if !self.check_keyword(keywords::Box) && !self.check_keyword(keywords::In) {
-                return self.parse_dot_or_call_expr();
-            }
-
-            let lo = self.span.lo;
-            let keyword_hi = self.span.hi;
-
-            let is_in = self.token.is_keyword(keywords::In);
-            try!(self.bump());
-
-            if is_in {
+          token::Ident(..) if self.token.is_keyword(keywords::In) => {
+              try!(self.bump());
               let place = try!(self.parse_expr_res(Restrictions::RESTRICTION_NO_STRUCT_LITERAL));
               let blk = try!(self.parse_block());
               hi = blk.span.hi;
               let blk_expr = self.mk_expr(blk.span.lo, blk.span.hi, ExprBlock(blk));
-              ex = ExprBox(Some(place), blk_expr);
-              return Ok(self.mk_expr(lo, hi, ex));
-            }
-
-            // FIXME (#22181) Remove `box (PLACE) EXPR` support
-            // entirely after next release (enabling `(box (EXPR))`),
-            // since it will be replaced by `in PLACE { EXPR }`, ...
-            //
-            // ... but for now: check for a place: `box(PLACE) EXPR`.
-
-            if try!(self.eat(&token::OpenDelim(token::Paren))) {
-                let box_span = mk_sp(lo, self.last_span.hi);
-                self.span_warn(box_span,
-                    "deprecated syntax; use the `in` keyword now \
-                           (e.g. change `box (<expr>) <expr>` to \
-                                        `in <expr> { <expr> }`)");
-
-                // Continue supporting `box () EXPR` (temporarily)
-                if !try!(self.eat(&token::CloseDelim(token::Paren))) {
-                    let place = try!(self.parse_expr_nopanic());
-                    try!(self.expect(&token::CloseDelim(token::Paren)));
-                    // Give a suggestion to use `box()` when a parenthesised expression is used
-                    if !self.token.can_begin_expr() {
-                        let span = self.span;
-                        let this_token_to_string = self.this_token_to_string();
-                        self.span_err(span,
-                                      &format!("expected expression, found `{}`",
-                                              this_token_to_string));
-
-                        // Spanning just keyword avoids constructing
-                        // printout of arg expression (which starts
-                        // with parenthesis, as established above).
-
-                        let box_span = mk_sp(lo, keyword_hi);
-                        self.span_suggestion(box_span,
-                                             "try using `box ()` instead:",
-                                             format!("box ()"));
-                        self.abort_if_errors();
-                    }
-                    let subexpression = try!(self.parse_prefix_expr());
-                    hi = subexpression.span.hi;
-                    ex = ExprBox(Some(place), subexpression);
-                    return Ok(self.mk_expr(lo, hi, ex));
-                }
-            }
-
-            // Otherwise, we use the unique pointer default.
-            let subexpression = try!(self.parse_prefix_expr());
-            hi = subexpression.span.hi;
-
-            // FIXME (pnkfelix): After working out kinks with box
-            // desugaring, should be `ExprBox(None, subexpression)`
-            // instead.
-            ex = self.mk_unary(UnUniq, subexpression);
+              ex = ExprInPlace(place, blk_expr);
+          }
+          token::Ident(..) if self.token.is_keyword(keywords::Box) => {
+              try!(self.bump());
+              let subexpression = try!(self.parse_prefix_expr());
+              hi = subexpression.span.hi;
+              ex = ExprBox(subexpression);
           }
           _ => return self.parse_dot_or_call_expr()
         }
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index df72645f97d..6d3f036894f 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -1811,13 +1811,12 @@ impl<'a> State<'a> {
         Ok(())
     }
 
-    fn print_expr_box(&mut self,
-                      place: &Option<P<ast::Expr>>,
-                      expr: &ast::Expr) -> io::Result<()> {
-        try!(word(&mut self.s, "box"));
-        try!(word(&mut self.s, "("));
-        try!(place.as_ref().map_or(Ok(()), |e|self.print_expr(&**e)));
-        try!(self.word_space(")"));
+    fn print_expr_in_place(&mut self,
+                           place: &ast::Expr,
+                           expr: &ast::Expr) -> io::Result<()> {
+        try!(self.word_space("in"));
+        try!(self.print_expr(place));
+        try!(space(&mut self.s));
         self.print_expr(expr)
     }
 
@@ -1948,8 +1947,12 @@ impl<'a> State<'a> {
         try!(self.ibox(indent_unit));
         try!(self.ann.pre(self, NodeExpr(expr)));
         match expr.node {
-            ast::ExprBox(ref place, ref expr) => {
-                try!(self.print_expr_box(place, &**expr));
+            ast::ExprBox(ref expr) => {
+                try!(self.word_space("box"));
+                try!(self.print_expr(expr));
+            }
+            ast::ExprInPlace(ref place, ref expr) => {
+                try!(self.print_expr_in_place(place, expr));
             }
             ast::ExprVec(ref exprs) => {
                 try!(self.print_expr_vec(&exprs[..]));
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs
index f4f4c9dfc24..23c02905cf7 100644
--- a/src/libsyntax/visit.rs
+++ b/src/libsyntax/visit.rs
@@ -735,8 +735,11 @@ pub fn walk_mac<'v, V: Visitor<'v>>(_: &mut V, _: &'v Mac) {
 
 pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
     match expression.node {
-        ExprBox(ref place, ref subexpression) => {
-            place.as_ref().map(|e|visitor.visit_expr(&**e));
+        ExprBox(ref subexpression) => {
+            visitor.visit_expr(&**subexpression)
+        }
+        ExprInPlace(ref place, ref subexpression) => {
+            visitor.visit_expr(&**place);
             visitor.visit_expr(&**subexpression)
         }
         ExprVec(ref subexpressions) => {
diff --git a/src/test/auxiliary/issue-2380.rs b/src/test/auxiliary/issue-2380.rs
index 96f33f97a69..cfebc4abaaa 100644
--- a/src/test/auxiliary/issue-2380.rs
+++ b/src/test/auxiliary/issue-2380.rs
@@ -22,5 +22,5 @@ pub trait i<T>
 pub fn f<T>() -> Box<i<T>+'static> {
     impl<T> i<T> for () { }
 
-    box() () as Box<i<T>+'static>
+    box () as Box<i<T>+'static>
 }
diff --git a/src/test/compile-fail/borrowck-lend-flow-if.rs b/src/test/compile-fail/borrowck-lend-flow-if.rs
index a0a6e54e942..a6ce36a5507 100644
--- a/src/test/compile-fail/borrowck-lend-flow-if.rs
+++ b/src/test/compile-fail/borrowck-lend-flow-if.rs
@@ -23,8 +23,7 @@ fn for_func<F>(_f: F) where F: FnOnce() -> bool { panic!() }
 fn produce<T>() -> T { panic!(); }
 
 fn inc(v: &mut Box<isize>) {
-    *v = box() (**v + 1);
-    //~^ WARN deprecated syntax
+    *v = box (**v + 1);
 }
 
 fn pre_freeze_cond() {
diff --git a/src/test/compile-fail/borrowck-lend-flow-loop.rs b/src/test/compile-fail/borrowck-lend-flow-loop.rs
index 9356eeda605..f09e7ffd7e4 100644
--- a/src/test/compile-fail/borrowck-lend-flow-loop.rs
+++ b/src/test/compile-fail/borrowck-lend-flow-loop.rs
@@ -22,8 +22,7 @@ fn cond() -> bool { panic!() }
 fn produce<T>() -> T { panic!(); }
 
 fn inc(v: &mut Box<isize>) {
-    *v = box() (**v + 1);
-    //~^ WARN deprecated syntax
+    *v = box (**v + 1);
 }
 
 fn loop_overarching_alias_mut() {
diff --git a/src/test/compile-fail/borrowck-lend-flow.rs b/src/test/compile-fail/borrowck-lend-flow.rs
index c3dcddf8587..1ed779cfaac 100644
--- a/src/test/compile-fail/borrowck-lend-flow.rs
+++ b/src/test/compile-fail/borrowck-lend-flow.rs
@@ -23,8 +23,7 @@ fn for_func<F>(_f: F) where F: FnOnce() -> bool { panic!() }
 fn produce<T>() -> T { panic!(); }
 
 fn inc(v: &mut Box<isize>) {
-    *v = box() (**v + 1);
-    //~^ WARN deprecated syntax
+    *v = box (**v + 1);
 }
 
 fn pre_freeze() {
diff --git a/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs b/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs
index 558475c28d7..a9079cfc27d 100644
--- a/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs
+++ b/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs
@@ -22,8 +22,7 @@ impl Add for foo {
     fn add(self, f: foo) -> foo {
         let foo(box i) = self;
         let foo(box j) = f;
-        foo(box() (i + j))
-        //~^ WARN deprecated syntax
+        foo(box (i + j))
     }
 }
 
diff --git a/src/test/compile-fail/feature-gate-box-expr.rs b/src/test/compile-fail/feature-gate-box-expr.rs
index ace1b399662..f1bb5c0dea2 100644
--- a/src/test/compile-fail/feature-gate-box-expr.rs
+++ b/src/test/compile-fail/feature-gate-box-expr.rs
@@ -19,8 +19,4 @@
 fn main() {
     let x = box 'c'; //~ ERROR box expression syntax is experimental
     println!("x: {}", x);
-
-    let x = box () 'c'; //~ ERROR box expression syntax is experimental
-    //~^ WARN deprecated syntax
-    println!("x: {}", x);
 }
diff --git a/src/test/compile-fail/feature-gate-placement-expr.rs b/src/test/compile-fail/feature-gate-placement-expr.rs
index 7c75605d57d..47a25bf637c 100644
--- a/src/test/compile-fail/feature-gate-placement-expr.rs
+++ b/src/test/compile-fail/feature-gate-placement-expr.rs
@@ -19,10 +19,6 @@
 fn main() {
     use std::boxed::HEAP;
 
-    let x = box (HEAP) 'c'; //~ ERROR placement-in expression syntax is experimental
-    //~^ WARN deprecated syntax
-    println!("x: {}", x);
-
     let x = in HEAP { 'c' }; //~ ERROR placement-in expression syntax is experimental
     println!("x: {}", x);
 }
diff --git a/src/test/compile-fail/issue-14084.rs b/src/test/compile-fail/issue-14084.rs
index b33a6767274..b2863202ef0 100644
--- a/src/test/compile-fail/issue-14084.rs
+++ b/src/test/compile-fail/issue-14084.rs
@@ -12,8 +12,7 @@
 #![feature(placement_in_syntax)]
 
 fn main() {
-    box ( () ) 0;
+    in () { 0 };
     //~^ ERROR: the trait `core::ops::Placer<_>` is not implemented
     //~| ERROR: the trait `core::ops::Placer<_>` is not implemented
-    //~| WARN deprecated syntax
 }
diff --git a/src/test/compile-fail/moves-based-on-type-tuple.rs b/src/test/compile-fail/moves-based-on-type-tuple.rs
index e1d462d1700..a4d3e3ee02f 100644
--- a/src/test/compile-fail/moves-based-on-type-tuple.rs
+++ b/src/test/compile-fail/moves-based-on-type-tuple.rs
@@ -11,8 +11,7 @@
 #![feature(box_syntax)]
 
 fn dup(x: Box<isize>) -> Box<(Box<isize>,Box<isize>)> {
-    box() (x, x) //~ ERROR use of moved value
-    //~^ WARN deprecated syntax
+    box (x, x) //~ ERROR use of moved value
 }
 fn main() {
     dup(box 3);
diff --git a/src/test/debuginfo/borrowed-tuple.rs b/src/test/debuginfo/borrowed-tuple.rs
index 2438879dfb6..e3da3934f6d 100644
--- a/src/test/debuginfo/borrowed-tuple.rs
+++ b/src/test/debuginfo/borrowed-tuple.rs
@@ -50,7 +50,7 @@ fn main() {
     let stack_val_ref: &(i16, f32) = &stack_val;
     let ref_to_unnamed: &(i16, f32) = &(-15, -20f32);
 
-    let unique_val: Box<(i16, f32)> = box() (-17, -22f32);
+    let unique_val: Box<(i16, f32)> = box (-17, -22f32);
     let unique_val_ref: &(i16, f32) = &*unique_val;
 
     zzz(); // #break
diff --git a/src/test/debuginfo/box.rs b/src/test/debuginfo/box.rs
index a731e041d79..106d0b243eb 100644
--- a/src/test/debuginfo/box.rs
+++ b/src/test/debuginfo/box.rs
@@ -37,7 +37,7 @@
 
 fn main() {
     let a = box 1;
-    let b = box() (2, 3.5f64);
+    let b = box (2, 3.5f64);
 
     zzz(); // #break
 }
diff --git a/src/test/debuginfo/destructured-fn-argument.rs b/src/test/debuginfo/destructured-fn-argument.rs
index a3a48b78616..954a7abe632 100644
--- a/src/test/debuginfo/destructured-fn-argument.rs
+++ b/src/test/debuginfo/destructured-fn-argument.rs
@@ -433,7 +433,7 @@ fn main() {
     managed_box(&(34, 35));
     borrowed_pointer(&(36, 37));
     contained_borrowed_pointer((&38, 39));
-    unique_pointer(box() (40, 41, 42));
+    unique_pointer(box (40, 41, 42));
     ref_binding((43, 44, 45));
     ref_binding_in_tuple((46, (47, 48)));
     ref_binding_in_struct(Struct { a: 49, b: 50 });
diff --git a/src/test/debuginfo/destructured-local.rs b/src/test/debuginfo/destructured-local.rs
index a73b5c8de11..a43e4546d4f 100644
--- a/src/test/debuginfo/destructured-local.rs
+++ b/src/test/debuginfo/destructured-local.rs
@@ -304,7 +304,7 @@ fn main() {
     let (&cc, _) = (&38, 39);
 
     // unique pointer
-    let box dd = box() (40, 41, 42);
+    let box dd = box (40, 41, 42);
 
     // ref binding
     let ref ee = (43, 44, 45);
diff --git a/src/test/parse-fail/parenthesized-box-expr-message.rs b/src/test/parse-fail/parenthesized-box-expr-message.rs
deleted file mode 100644
index 3cf3685d5bd..00000000000
--- a/src/test/parse-fail/parenthesized-box-expr-message.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    box (1 + 1)
-    //~^ HELP try using `box ()` instead:
-    //~| SUGGESTION box () (1 + 1)
-    //~| WARN deprecated syntax
-    ; //~ ERROR expected expression, found `;`
-}
diff --git a/src/test/run-pass/autoderef-method-on-trait.rs b/src/test/run-pass/autoderef-method-on-trait.rs
index 40acb6eb9fe..5c5364de6a8 100644
--- a/src/test/run-pass/autoderef-method-on-trait.rs
+++ b/src/test/run-pass/autoderef-method-on-trait.rs
@@ -21,6 +21,6 @@ impl double for usize {
 }
 
 pub fn main() {
-    let x: Box<_> = box() (box 3usize as Box<double>);
+    let x: Box<_> = box (box 3usize as Box<double>);
     assert_eq!(x.double(), 6);
 }
diff --git a/src/test/run-pass/crate-method-reexport-grrrrrrr.rs b/src/test/run-pass/crate-method-reexport-grrrrrrr.rs
index 43507f0cb00..028b3f43e2a 100644
--- a/src/test/run-pass/crate-method-reexport-grrrrrrr.rs
+++ b/src/test/run-pass/crate-method-reexport-grrrrrrr.rs
@@ -24,7 +24,7 @@ extern crate crate_method_reexport_grrrrrrr2;
 pub fn main() {
     use crate_method_reexport_grrrrrrr2::rust::add;
     use crate_method_reexport_grrrrrrr2::rust::cx;
-    let x: Box<_> = box () ();
+    let x: Box<_> = box ();
     x.cx();
     let y = ();
     y.add("hi".to_string());
diff --git a/src/test/run-pass/issue-10767.rs b/src/test/run-pass/issue-10767.rs
index 9d680d1962f..b5ef6020b57 100644
--- a/src/test/run-pass/issue-10767.rs
+++ b/src/test/run-pass/issue-10767.rs
@@ -16,5 +16,5 @@
 pub fn main() {
     fn f() {
     };
-    let _: Box<fn()> = box() (f as fn());
+    let _: Box<fn()> = box (f as fn());
 }
diff --git a/src/test/run-pass/issue-2935.rs b/src/test/run-pass/issue-2935.rs
index fd8e1e6b036..511344a792f 100644
--- a/src/test/run-pass/issue-2935.rs
+++ b/src/test/run-pass/issue-2935.rs
@@ -28,7 +28,7 @@ pub fn main() {
   //   let y = box ({a: 4});
   //    let z = box ({a: 4} as it);
   //    let z = box ({a: true} as it);
-    let z: Box<_> = box () (box true as Box<it>);
+    let z: Box<_> = box (box true as Box<it>);
     //  x.f();
     // y.f();
     // (*z).f();
diff --git a/src/test/run-pass/new-box-syntax.rs b/src/test/run-pass/new-box-syntax.rs
index da57e8682ca..34687c6ca1d 100644
--- a/src/test/run-pass/new-box-syntax.rs
+++ b/src/test/run-pass/new-box-syntax.rs
@@ -31,10 +31,10 @@ struct Structure {
 }
 
 pub fn main() {
-    let x: Box<isize> = box(HEAP) 2;
+    let x: Box<isize> = in HEAP { 2 };
     let y: Box<isize> = box 2;
-    let b: Box<isize> = box()(1 + 2);
-    let c = box()(3 + 4);
+    let b: Box<isize> = box (1 + 2);
+    let c = box (3 + 4);
 
     let s: Box<Structure> = box Structure {
         x: 3,
diff --git a/src/test/run-pass/regions-early-bound-trait-param.rs b/src/test/run-pass/regions-early-bound-trait-param.rs
index 72a214f4c9a..4ba04aa7091 100644
--- a/src/test/run-pass/regions-early-bound-trait-param.rs
+++ b/src/test/run-pass/regions-early-bound-trait-param.rs
@@ -83,7 +83,7 @@ impl<'s> Trait<'s> for (isize,isize) {
 
 impl<'t> MakerTrait for Box<Trait<'t>+'static> {
     fn mk() -> Box<Trait<'t>+'static> {
-        let tup: Box<(isize, isize)> = box() (4,5);
+        let tup: Box<(isize, isize)> = box (4,5);
         tup as Box<Trait>
     }
 }
diff --git a/src/test/run-pass/trait-object-generics.rs b/src/test/run-pass/trait-object-generics.rs
index 15a8a2e83e3..33bee3ea06f 100644
--- a/src/test/run-pass/trait-object-generics.rs
+++ b/src/test/run-pass/trait-object-generics.rs
@@ -49,6 +49,6 @@ impl<V> Trait<u8,V> for () {
 }
 
 pub fn main() {
-    let a = box() () as Box<Trait<u8, u8>>;
+    let a = box () as Box<Trait<u8, u8>>;
     assert_eq!(a.method(Type::Constant((1, 2))), 0);
 }