about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-12-14 23:02:15 -0800
committerbors <bors@rust-lang.org>2013-12-14 23:02:15 -0800
commit7f5787ac26e66f42323fa417cb4b0356b22e7da5 (patch)
tree82d5b4742d97c77f8bbb2944a0d9a7df0fe0dd28
parent8f6df87c1d876895a7e313728b43d9710ae682bb (diff)
parent6747d0738a88e7a94171ec7b3f42c837352bc5be (diff)
downloadrust-7f5787ac26e66f42323fa417cb4b0356b22e7da5.tar.gz
rust-7f5787ac26e66f42323fa417cb4b0356b22e7da5.zip
auto merge of #10932 : alexcrichton/rust/feature-update, r=cmr
-rw-r--r--src/librustc/front/feature_gate.rs27
-rw-r--r--src/librustc/middle/lint.rs18
-rw-r--r--src/test/compile-fail/auto-ref-slice-plus-ref.rs2
-rw-r--r--src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs2
-rw-r--r--src/test/compile-fail/borrowck-loan-rcvr.rs2
-rw-r--r--src/test/compile-fail/borrowck-mut-boxed-vec.rs2
-rw-r--r--src/test/compile-fail/issue-3763.rs2
-rw-r--r--src/test/compile-fail/lint-heap-memory.rs16
-rw-r--r--src/test/compile-fail/moves-based-on-type-exprs.rs2
-rw-r--r--src/test/compile-fail/non-exhaustive-match.rs2
-rw-r--r--src/test/compile-fail/occurs-check.rs2
-rw-r--r--src/test/compile-fail/static-region-bound.rs2
-rw-r--r--src/test/compile-fail/unique-unique-kind.rs2
-rw-r--r--src/test/debug-info/borrowed-struct.rs1
-rw-r--r--src/test/debug-info/box.rs1
-rw-r--r--src/test/debug-info/boxed-struct.rs1
-rw-r--r--src/test/debug-info/destructured-local.rs1
-rw-r--r--src/test/debug-info/generic-method-on-generic-struct.rs2
-rw-r--r--src/test/debug-info/managed-enum.rs2
-rw-r--r--src/test/debug-info/method-on-enum.rs1
-rw-r--r--src/test/debug-info/method-on-generic-struct.rs2
-rw-r--r--src/test/debug-info/method-on-struct.rs2
-rw-r--r--src/test/debug-info/method-on-trait.rs2
-rw-r--r--src/test/debug-info/method-on-tuple-struct.rs2
-rw-r--r--src/test/debug-info/self-in-default-method.rs2
-rw-r--r--src/test/debug-info/self-in-generic-default-method.rs2
-rw-r--r--src/test/debug-info/var-captured-in-nested-closure.rs1
-rw-r--r--src/test/debug-info/var-captured-in-stack-closure.rs1
-rw-r--r--src/test/pretty/block-disambig.rs2
-rw-r--r--src/test/run-fail/borrowck-wg-autoderef-and-autoborrowvec-combined-fail-issue-6272.rs2
-rw-r--r--src/test/run-fail/borrowck-wg-fail-2.rs2
-rw-r--r--src/test/run-fail/borrowck-wg-fail-3.rs2
-rw-r--r--src/test/run-fail/borrowck-wg-one-mut-one-imm-slice-method.rs2
-rw-r--r--src/test/run-fail/borrowck-wg-one-mut-one-imm-slices.rs2
-rw-r--r--src/test/run-fail/borrowck-wg-one-mut-one-imm.rs2
-rw-r--r--src/test/run-fail/borrowck-wg-two-array-indices.rs2
-rw-r--r--src/test/run-fail/unwind-assert.rs2
-rw-r--r--src/test/run-fail/unwind-box-res.rs2
-rw-r--r--src/test/run-fail/unwind-box-str.rs2
-rw-r--r--src/test/run-fail/unwind-box-unique-unique.rs2
-rw-r--r--src/test/run-fail/unwind-box-unique.rs2
-rw-r--r--src/test/run-fail/unwind-box-vec.rs2
-rw-r--r--src/test/run-fail/unwind-box.rs2
-rw-r--r--src/test/run-fail/unwind-fail.rs2
-rw-r--r--src/test/run-fail/unwind-iter.rs1
-rw-r--r--src/test/run-fail/unwind-iter2.rs2
-rw-r--r--src/test/run-fail/unwind-match.rs2
-rw-r--r--src/test/run-fail/unwind-misc-1.rs2
-rw-r--r--src/test/run-fail/unwind-nested.rs2
-rw-r--r--src/test/run-fail/unwind-partial-box.rs2
-rw-r--r--src/test/run-fail/unwind-partial-unique.rs2
-rw-r--r--src/test/run-fail/unwind-partial-vec.rs2
-rw-r--r--src/test/run-fail/unwind-stacked.rs2
-rw-r--r--src/test/run-fail/unwind-uninitialized.rs2
-rw-r--r--src/test/run-pass/auto-ref-slice-plus-ref.rs2
-rw-r--r--src/test/run-pass/autoderef-method-twice.rs2
-rw-r--r--src/test/run-pass/autoderef-method.rs2
-rw-r--r--src/test/run-pass/borrowck-borrow-from-at-vec.rs2
-rw-r--r--src/test/run-pass/borrowck-preserve-box-in-discr.rs2
-rw-r--r--src/test/run-pass/borrowck-preserve-box-in-field.rs2
-rw-r--r--src/test/run-pass/borrowck-preserve-box-in-pat.rs2
-rw-r--r--src/test/run-pass/borrowck-preserve-box-in-uniq.rs2
-rw-r--r--src/test/run-pass/borrowck-preserve-box.rs2
-rw-r--r--src/test/run-pass/borrowck-preserve-cond-box.rs2
-rw-r--r--src/test/run-pass/borrowck-preserve-expl-deref.rs2
-rw-r--r--src/test/run-pass/borrowck-univariant-enum.rs2
-rw-r--r--src/test/run-pass/borrowck-wg-autoderef-and-autoborrowvec-combined-issue-6272.rs1
-rw-r--r--src/test/run-pass/borrowck-wg-simple.rs2
-rw-r--r--src/test/run-pass/borrowck-wg-two-imm-borrows.rs2
-rw-r--r--src/test/run-pass/borrowed-ptr-pattern-infallible.rs2
-rw-r--r--src/test/run-pass/cci_borrow.rs2
-rw-r--r--src/test/run-pass/deref-lval.rs2
-rw-r--r--src/test/run-pass/deriving-encodable-decodable.rs2
-rw-r--r--src/test/run-pass/expr-block-box.rs3
-rw-r--r--src/test/run-pass/expr-block-ref.rs2
-rw-r--r--src/test/run-pass/expr-elseif-ref2.rs2
-rw-r--r--src/test/run-pass/expr-if-box.rs4
-rw-r--r--src/test/run-pass/expr-match-box.rs4
-rw-r--r--src/test/run-pass/hashmap-memory.rs2
-rw-r--r--src/test/run-pass/intrinsic-move-val.rs2
-rw-r--r--src/test/run-pass/issue-2708.rs2
-rw-r--r--src/test/run-pass/issue-3012-2.rs3
-rw-r--r--src/test/run-pass/issue-3860.rs2
-rw-r--r--src/test/run-pass/issue-4092.rs2
-rw-r--r--src/test/run-pass/issue-5517.rs2
-rw-r--r--src/test/run-pass/issue-5926.rs1
-rw-r--r--src/test/run-pass/issue-6117.rs2
-rw-r--r--src/test/run-pass/issue-8898.rs1
-rw-r--r--src/test/run-pass/issue-9382.rs1
-rw-r--r--src/test/run-pass/lambda-infer-unresolved.rs1
-rw-r--r--src/test/run-pass/let-destruct.rs2
-rw-r--r--src/test/run-pass/move-2.rs1
-rw-r--r--src/test/run-pass/nested-exhaustive-match.rs2
-rw-r--r--src/test/run-pass/rcvr-borrowed-to-region.rs2
-rw-r--r--src/test/run-pass/regions-appearance-constraint.rs2
-rw-r--r--src/test/run-pass/regions-borrow-at.rs2
-rw-r--r--src/test/run-pass/regions-borrow-evec-at.rs2
-rw-r--r--src/test/run-pass/regions-escape-into-other-fn.rs2
-rw-r--r--src/test/run-pass/regions-infer-borrow-scope-within-loop-ok.rs2
-rw-r--r--src/test/run-pass/regions-infer-borrow-scope.rs2
-rw-r--r--src/test/run-pass/repeated-vector-syntax.rs2
-rw-r--r--src/test/run-pass/struct-field-assignability.rs2
-rw-r--r--src/test/run-pass/type-param-constraints.rs2
-rw-r--r--src/test/run-pass/unique-assign-generic.rs2
-rw-r--r--src/test/run-pass/unique-copy-box.rs1
-rw-r--r--src/test/run-pass/unwind-box.rs2
-rw-r--r--src/test/run-pass/vec-matching-autoslice.rs2
-rw-r--r--src/test/run-pass/vec-to_str.rs2
108 files changed, 241 insertions, 21 deletions
diff --git a/src/librustc/front/feature_gate.rs b/src/librustc/front/feature_gate.rs
index 868b53c2465..6bbf18de693 100644
--- a/src/librustc/front/feature_gate.rs
+++ b/src/librustc/front/feature_gate.rs
@@ -77,6 +77,14 @@ impl Context {
         }
     }
 
+    fn gate_box(&self, span: Span) {
+        self.gate_feature("managed_boxes", span,
+                          "The managed box syntax is being replaced by the \
+                           `std::gc::Gc` and `std::rc::Rc` types. Equivalent \
+                           functionality to managed trait objects will be \
+                           implemented but is currently missing.");
+    }
+
     fn has_feature(&self, feature: &str) -> bool {
         self.features.iter().any(|n| n.as_slice() == feature)
     }
@@ -172,17 +180,24 @@ impl Visitor<()> for Context {
                                    experimental and likely to be removed");
 
             },
-            ast::ty_box(_) => {
-                self.gate_feature("managed_boxes", t.span,
-                                  "The managed box syntax is being replaced by the `std::gc::Gc` \
-                                  and `std::rc::Rc` types. Equivalent functionality to managed \
-                                  trait objects will be implemented but is currently missing.");
-            }
+            ast::ty_box(_) => { self.gate_box(t.span); }
             _ => {}
         }
 
         visit::walk_ty(self, t, ());
     }
+
+    fn visit_expr(&mut self, e: @ast::Expr, _: ()) {
+        match e.node {
+            ast::ExprUnary(_, ast::UnBox(..), _) |
+            ast::ExprVstore(_, ast::ExprVstoreBox) |
+            ast::ExprVstore(_, ast::ExprVstoreMutBox) => {
+                self.gate_box(e.span);
+            }
+            _ => {}
+        }
+        visit::walk_expr(self, e, ());
+    }
 }
 
 pub fn check_crate(sess: Session, crate: &ast::Crate) {
diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs
index feee3583f71..5128f90a0a5 100644
--- a/src/librustc/middle/lint.rs
+++ b/src/librustc/middle/lint.rs
@@ -770,9 +770,21 @@ fn check_heap_type(cx: &Context, span: Span, ty: ty::t) {
         let mut n_uniq = 0;
         ty::fold_ty(cx.tcx, ty, |t| {
             match ty::get(t).sty {
-              ty::ty_box(_) => n_box += 1,
-              ty::ty_uniq(_) => n_uniq += 1,
-              _ => ()
+                ty::ty_box(_) | ty::ty_estr(ty::vstore_box) |
+                ty::ty_evec(_, ty::vstore_box) |
+                ty::ty_trait(_, _, ty::BoxTraitStore, _, _) => {
+                    n_box += 1;
+                }
+                ty::ty_uniq(_) | ty::ty_estr(ty::vstore_uniq) |
+                ty::ty_evec(_, ty::vstore_uniq) |
+                ty::ty_trait(_, _, ty::UniqTraitStore, _, _) => {
+                    n_uniq += 1;
+                }
+                ty::ty_closure(ref c) if c.sigil == ast::OwnedSigil => {
+                    n_uniq += 1;
+                }
+
+                _ => ()
             };
             t
         });
diff --git a/src/test/compile-fail/auto-ref-slice-plus-ref.rs b/src/test/compile-fail/auto-ref-slice-plus-ref.rs
index 9f73955f29e..311becc63ef 100644
--- a/src/test/compile-fail/auto-ref-slice-plus-ref.rs
+++ b/src/test/compile-fail/auto-ref-slice-plus-ref.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 fn main() {
 
     // Testing that method lookup does not automatically borrow
diff --git a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
index b205c5be217..bfc1884ac5a 100644
--- a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
+++ b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 struct Point {
     x: int,
     y: int,
diff --git a/src/test/compile-fail/borrowck-loan-rcvr.rs b/src/test/compile-fail/borrowck-loan-rcvr.rs
index c2ed3378bf9..5c6f7082ed0 100644
--- a/src/test/compile-fail/borrowck-loan-rcvr.rs
+++ b/src/test/compile-fail/borrowck-loan-rcvr.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 struct point { x: int, y: int }
 
 trait methods {
diff --git a/src/test/compile-fail/borrowck-mut-boxed-vec.rs b/src/test/compile-fail/borrowck-mut-boxed-vec.rs
index 1a8fa50c76e..84c2db8bd57 100644
--- a/src/test/compile-fail/borrowck-mut-boxed-vec.rs
+++ b/src/test/compile-fail/borrowck-mut-boxed-vec.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 fn main() {
     let v = @mut [ 1, 2, 3 ];
     for _x in v.iter() {
diff --git a/src/test/compile-fail/issue-3763.rs b/src/test/compile-fail/issue-3763.rs
index 7097615b87e..a4d184e346b 100644
--- a/src/test/compile-fail/issue-3763.rs
+++ b/src/test/compile-fail/issue-3763.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 mod my_mod {
     pub struct MyStruct {
         priv priv_field: int
diff --git a/src/test/compile-fail/lint-heap-memory.rs b/src/test/compile-fail/lint-heap-memory.rs
index b550c227898..c02da1beeb7 100644
--- a/src/test/compile-fail/lint-heap-memory.rs
+++ b/src/test/compile-fail/lint-heap-memory.rs
@@ -19,6 +19,20 @@ struct Foo {
 struct Bar { x: ~int } //~ ERROR type uses owned
 
 fn main() {
-    let _x : Bar = Bar {x : ~10};
+    let _x : Bar = Bar {x : ~10}; //~ ERROR type uses owned
+
+    @2; //~ ERROR type uses managed
+    @[1]; //~ ERROR type uses managed
+    //~^ ERROR type uses managed
+    fn f(_: @Clone) {} //~ ERROR type uses managed
+    @""; //~ ERROR type uses managed
+    //~^ ERROR type uses managed
+
+    ~2; //~ ERROR type uses owned
+    ~[1]; //~ ERROR type uses owned
+    //~^ ERROR type uses owned
+    fn g(_: ~Clone) {} //~ ERROR type uses owned
+    ~""; //~ ERROR type uses owned
     //~^ ERROR type uses owned
+    proc() {}; //~ ERROR type uses owned
 }
diff --git a/src/test/compile-fail/moves-based-on-type-exprs.rs b/src/test/compile-fail/moves-based-on-type-exprs.rs
index fec0f89adba..34e506ed015 100644
--- a/src/test/compile-fail/moves-based-on-type-exprs.rs
+++ b/src/test/compile-fail/moves-based-on-type-exprs.rs
@@ -1,6 +1,8 @@
 // Tests that references to move-by-default values trigger moves when
 // they occur as part of various kinds of expressions.
 
+#[feature(managed_boxes)];
+
 struct Foo<A> { f: A }
 fn guard(_s: ~str) -> bool {fail!()}
 fn touch<A>(_a: &A) {}
diff --git a/src/test/compile-fail/non-exhaustive-match.rs b/src/test/compile-fail/non-exhaustive-match.rs
index e728b9c2fd7..c8183d70f87 100644
--- a/src/test/compile-fail/non-exhaustive-match.rs
+++ b/src/test/compile-fail/non-exhaustive-match.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 enum t { a, b, }
 
 fn main() {
diff --git a/src/test/compile-fail/occurs-check.rs b/src/test/compile-fail/occurs-check.rs
index d6a5a747e8d..f08272f58ac 100644
--- a/src/test/compile-fail/occurs-check.rs
+++ b/src/test/compile-fail/occurs-check.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 fn main() {
     let f; //~ ERROR cyclic type of infinite size
     f = @f;
diff --git a/src/test/compile-fail/static-region-bound.rs b/src/test/compile-fail/static-region-bound.rs
index ada3aebb2f4..35f5ac1bb18 100644
--- a/src/test/compile-fail/static-region-bound.rs
+++ b/src/test/compile-fail/static-region-bound.rs
@@ -1,3 +1,5 @@
+#[feature(managed_boxes)];
+
 fn f<T:'static>(_: T) {}
 
 fn main() {
diff --git a/src/test/compile-fail/unique-unique-kind.rs b/src/test/compile-fail/unique-unique-kind.rs
index d51df4979e3..b9965b18229 100644
--- a/src/test/compile-fail/unique-unique-kind.rs
+++ b/src/test/compile-fail/unique-unique-kind.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 fn f<T:Send>(_i: T) {
 }
 
diff --git a/src/test/debug-info/borrowed-struct.rs b/src/test/debug-info/borrowed-struct.rs
index 91ca11aeeed..0bb8b247e59 100644
--- a/src/test/debug-info/borrowed-struct.rs
+++ b/src/test/debug-info/borrowed-struct.rs
@@ -45,6 +45,7 @@
 // debugger:print *unique_val_interior_ref_2
 // check:$10 = 26.5
 
+#[feature(managed_boxes)];
 #[allow(unused_variable)];
 
 struct SomeStruct {
diff --git a/src/test/debug-info/box.rs b/src/test/debug-info/box.rs
index 7ab36027757..304d150d57e 100644
--- a/src/test/debug-info/box.rs
+++ b/src/test/debug-info/box.rs
@@ -24,6 +24,7 @@
 // debugger:print d->val
 // check:$4 = false
 
+#[feature(managed_boxes)];
 #[allow(unused_variable)];
 
 fn main() {
diff --git a/src/test/debug-info/boxed-struct.rs b/src/test/debug-info/boxed-struct.rs
index 87986b7a866..ff67d35a9cd 100644
--- a/src/test/debug-info/boxed-struct.rs
+++ b/src/test/debug-info/boxed-struct.rs
@@ -27,6 +27,7 @@
 // debugger:print managed_dtor->val
 // check:$4 = {x = 33, y = 333, z = 3333, w = 33333}
 
+#[feature(managed_boxes)];
 #[allow(unused_variable)];
 
 struct StructWithSomePadding {
diff --git a/src/test/debug-info/destructured-local.rs b/src/test/debug-info/destructured-local.rs
index 36c8dacbc13..5bb5eca30e2 100644
--- a/src/test/debug-info/destructured-local.rs
+++ b/src/test/debug-info/destructured-local.rs
@@ -125,6 +125,7 @@
 // debugger:print *nn
 // check:$43 = 56
 
+#[feature(managed_boxes)];
 #[allow(unused_variable)];
 
 struct Struct {
diff --git a/src/test/debug-info/generic-method-on-generic-struct.rs b/src/test/debug-info/generic-method-on-generic-struct.rs
index 8eafef5ab10..80f2031b92e 100644
--- a/src/test/debug-info/generic-method-on-generic-struct.rs
+++ b/src/test/debug-info/generic-method-on-generic-struct.rs
@@ -94,6 +94,8 @@
 // check:$21 = {-16, 16.5}
 // debugger:continue
 
+#[feature(managed_boxes)];
+
 struct Struct<T> {
     x: T
 }
diff --git a/src/test/debug-info/managed-enum.rs b/src/test/debug-info/managed-enum.rs
index 02a9cf1237f..5ab39e00eb3 100644
--- a/src/test/debug-info/managed-enum.rs
+++ b/src/test/debug-info/managed-enum.rs
@@ -25,7 +25,7 @@
 // check:$3 = {-9747455}
 
 #[allow(unused_variable)];
-#[feature(struct_variant)];
+#[feature(struct_variant, managed_boxes)];
 
 // The first element is to ensure proper alignment, irrespective of the machines word size. Since
 // the size of the discriminant value is machine dependent, this has be taken into account when
diff --git a/src/test/debug-info/method-on-enum.rs b/src/test/debug-info/method-on-enum.rs
index c7e60289b22..622786fcb53 100644
--- a/src/test/debug-info/method-on-enum.rs
+++ b/src/test/debug-info/method-on-enum.rs
@@ -94,6 +94,7 @@
 // check:$21 = -16
 // debugger:continue
 
+#[feature(managed_boxes)];
 #[feature(struct_variant)];
 
 enum Enum {
diff --git a/src/test/debug-info/method-on-generic-struct.rs b/src/test/debug-info/method-on-generic-struct.rs
index e4524aaffd2..99ed66cc03b 100644
--- a/src/test/debug-info/method-on-generic-struct.rs
+++ b/src/test/debug-info/method-on-generic-struct.rs
@@ -94,6 +94,8 @@
 // check:$21 = -16
 // debugger:continue
 
+#[feature(managed_boxes)];
+
 struct Struct<T> {
     x: T
 }
diff --git a/src/test/debug-info/method-on-struct.rs b/src/test/debug-info/method-on-struct.rs
index 654f1db559b..9c2afadaef3 100644
--- a/src/test/debug-info/method-on-struct.rs
+++ b/src/test/debug-info/method-on-struct.rs
@@ -94,6 +94,8 @@
 // check:$21 = -16
 // debugger:continue
 
+#[feature(managed_boxes)];
+
 struct Struct {
     x: int
 }
diff --git a/src/test/debug-info/method-on-trait.rs b/src/test/debug-info/method-on-trait.rs
index e6e024323c3..6b67dcc18a9 100644
--- a/src/test/debug-info/method-on-trait.rs
+++ b/src/test/debug-info/method-on-trait.rs
@@ -94,6 +94,8 @@
 // check:$21 = -16
 // debugger:continue
 
+#[feature(managed_boxes)];
+
 struct Struct {
     x: int
 }
diff --git a/src/test/debug-info/method-on-tuple-struct.rs b/src/test/debug-info/method-on-tuple-struct.rs
index 0d19cf21514..46177664a11 100644
--- a/src/test/debug-info/method-on-tuple-struct.rs
+++ b/src/test/debug-info/method-on-tuple-struct.rs
@@ -94,6 +94,8 @@
 // check:$21 = -16
 // debugger:continue
 
+#[feature(managed_boxes)];
+
 struct TupleStruct(int, f64);
 
 impl TupleStruct {
diff --git a/src/test/debug-info/self-in-default-method.rs b/src/test/debug-info/self-in-default-method.rs
index d1b275c9ec0..f9726c5329b 100644
--- a/src/test/debug-info/self-in-default-method.rs
+++ b/src/test/debug-info/self-in-default-method.rs
@@ -94,6 +94,8 @@
 // check:$21 = -16
 // debugger:continue
 
+#[feature(managed_boxes)];
+
 struct Struct {
     x: int
 }
diff --git a/src/test/debug-info/self-in-generic-default-method.rs b/src/test/debug-info/self-in-generic-default-method.rs
index f09953487bc..1b1e0ccf652 100644
--- a/src/test/debug-info/self-in-generic-default-method.rs
+++ b/src/test/debug-info/self-in-generic-default-method.rs
@@ -94,6 +94,8 @@
 // check:$21 = {-16, 16.5}
 // debugger:continue
 
+#[feature(managed_boxes)];
+
 struct Struct {
     x: int
 }
diff --git a/src/test/debug-info/var-captured-in-nested-closure.rs b/src/test/debug-info/var-captured-in-nested-closure.rs
index c10697df899..1032356689f 100644
--- a/src/test/debug-info/var-captured-in-nested-closure.rs
+++ b/src/test/debug-info/var-captured-in-nested-closure.rs
@@ -49,6 +49,7 @@
 // check:$14 = 8
 // debugger:continue
 
+#[feature(managed_boxes)];
 #[allow(unused_variable)];
 
 struct Struct {
diff --git a/src/test/debug-info/var-captured-in-stack-closure.rs b/src/test/debug-info/var-captured-in-stack-closure.rs
index cbbb8cbbb12..53287a8511b 100644
--- a/src/test/debug-info/var-captured-in-stack-closure.rs
+++ b/src/test/debug-info/var-captured-in-stack-closure.rs
@@ -28,6 +28,7 @@
 // debugger:print managed->val
 // check:$6 = 7
 
+#[feature(managed_boxes)];
 #[allow(unused_variable)];
 
 struct Struct {
diff --git a/src/test/pretty/block-disambig.rs b/src/test/pretty/block-disambig.rs
index 5cc8f6e6edc..8d6eaef8b34 100644
--- a/src/test/pretty/block-disambig.rs
+++ b/src/test/pretty/block-disambig.rs
@@ -12,6 +12,8 @@
 // previously ambiguous (e.g. 'if true { } *val;' gets parsed as a
 // binop)
 
+#[feature(managed_boxes)];
+
 fn test1() { let val = @0; { } *val; }
 
 fn test2() -> int { let val = @0; { } *val }
diff --git a/src/test/run-fail/borrowck-wg-autoderef-and-autoborrowvec-combined-fail-issue-6272.rs b/src/test/run-fail/borrowck-wg-autoderef-and-autoborrowvec-combined-fail-issue-6272.rs
index 6e15f6edddc..c9bc061995d 100644
--- a/src/test/run-fail/borrowck-wg-autoderef-and-autoborrowvec-combined-fail-issue-6272.rs
+++ b/src/test/run-fail/borrowck-wg-autoderef-and-autoborrowvec-combined-fail-issue-6272.rs
@@ -8,6 +8,8 @@
 //
 // for a detailed explanation of what is going on here.
 
+#[feature(managed_boxes)];
+
 fn main() {
     let a = @mut [3i];
     let b = @mut [a];
diff --git a/src/test/run-fail/borrowck-wg-fail-2.rs b/src/test/run-fail/borrowck-wg-fail-2.rs
index 24b928920c2..284882ff6f5 100644
--- a/src/test/run-fail/borrowck-wg-fail-2.rs
+++ b/src/test/run-fail/borrowck-wg-fail-2.rs
@@ -3,6 +3,8 @@
 // Test that write guards trigger when there is a write to a field
 // of a frozen structure.
 
+#[feature(managed_boxes)];
+
 struct S {
     x: int
 }
diff --git a/src/test/run-fail/borrowck-wg-fail-3.rs b/src/test/run-fail/borrowck-wg-fail-3.rs
index 8a72d2680d9..2643ed261f9 100644
--- a/src/test/run-fail/borrowck-wg-fail-3.rs
+++ b/src/test/run-fail/borrowck-wg-fail-3.rs
@@ -3,6 +3,8 @@
 // Test that write guards trigger when there is a write to a directly
 // frozen @mut box.
 
+#[feature(managed_boxes)];
+
 fn main() {
     let x = @mut 3;
     let _y: &mut int = x;
diff --git a/src/test/run-fail/borrowck-wg-one-mut-one-imm-slice-method.rs b/src/test/run-fail/borrowck-wg-one-mut-one-imm-slice-method.rs
index 668fa54315e..d33e39e09a8 100644
--- a/src/test/run-fail/borrowck-wg-one-mut-one-imm-slice-method.rs
+++ b/src/test/run-fail/borrowck-wg-one-mut-one-imm-slice-method.rs
@@ -3,6 +3,8 @@
 // Test that write guards trigger when there is a coercion to
 // a slice on the receiver of a method.
 
+#[feature(managed_boxes)];
+
 trait MyMutSlice {
     fn my_mut_slice(self) -> Self;
 }
diff --git a/src/test/run-fail/borrowck-wg-one-mut-one-imm-slices.rs b/src/test/run-fail/borrowck-wg-one-mut-one-imm-slices.rs
index ef410fb5339..63287981bdc 100644
--- a/src/test/run-fail/borrowck-wg-one-mut-one-imm-slices.rs
+++ b/src/test/run-fail/borrowck-wg-one-mut-one-imm-slices.rs
@@ -2,6 +2,8 @@
 
 // Test that write guards trigger when arguments are coerced to slices.
 
+#[feature(managed_boxes)];
+
 fn add(x:&mut [int], y:&[int])
 {
     x[0] = x[0] + y[0];
diff --git a/src/test/run-fail/borrowck-wg-one-mut-one-imm.rs b/src/test/run-fail/borrowck-wg-one-mut-one-imm.rs
index 9e52c3ae928..0820b94e181 100644
--- a/src/test/run-fail/borrowck-wg-one-mut-one-imm.rs
+++ b/src/test/run-fail/borrowck-wg-one-mut-one-imm.rs
@@ -3,6 +3,8 @@
 // Test that write guards trigger when we are indexing into
 // an @mut vector.
 
+#[feature(managed_boxes)];
+
 fn add(x:&mut int, y:&int)
 {
     *x = *x + *y;
diff --git a/src/test/run-fail/borrowck-wg-two-array-indices.rs b/src/test/run-fail/borrowck-wg-two-array-indices.rs
index a41e529d062..5ee9cd37e87 100644
--- a/src/test/run-fail/borrowck-wg-two-array-indices.rs
+++ b/src/test/run-fail/borrowck-wg-two-array-indices.rs
@@ -3,6 +3,8 @@
 // Test that arguments trigger when there are *two mutable* borrows
 // of indices.
 
+#[feature(managed_boxes)];
+
 fn add(x:&mut int, y:&mut int)
 {
     *x = *x + *y;
diff --git a/src/test/run-fail/unwind-assert.rs b/src/test/run-fail/unwind-assert.rs
index 36954d2bad6..4ed79147947 100644
--- a/src/test/run-fail/unwind-assert.rs
+++ b/src/test/run-fail/unwind-assert.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn main() {
     let _a = @0;
     assert!(false);
diff --git a/src/test/run-fail/unwind-box-res.rs b/src/test/run-fail/unwind-box-res.rs
index f0d6e1c1882..6740331d2f0 100644
--- a/src/test/run-fail/unwind-box-res.rs
+++ b/src/test/run-fail/unwind-box-res.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 use std::cast;
 
 fn failfn() {
diff --git a/src/test/run-fail/unwind-box-str.rs b/src/test/run-fail/unwind-box-str.rs
index a30f2bfab0a..410b86d5714 100644
--- a/src/test/run-fail/unwind-box-str.rs
+++ b/src/test/run-fail/unwind-box-str.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn failfn() {
     fail!();
 }
diff --git a/src/test/run-fail/unwind-box-unique-unique.rs b/src/test/run-fail/unwind-box-unique-unique.rs
index fc8e3a793d2..c4747c6089e 100644
--- a/src/test/run-fail/unwind-box-unique-unique.rs
+++ b/src/test/run-fail/unwind-box-unique-unique.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn failfn() {
     fail!();
 }
diff --git a/src/test/run-fail/unwind-box-unique.rs b/src/test/run-fail/unwind-box-unique.rs
index 15925dc475e..e99c050d16a 100644
--- a/src/test/run-fail/unwind-box-unique.rs
+++ b/src/test/run-fail/unwind-box-unique.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn failfn() {
     fail!();
 }
diff --git a/src/test/run-fail/unwind-box-vec.rs b/src/test/run-fail/unwind-box-vec.rs
index 18b4cebaa33..4a5cd270116 100644
--- a/src/test/run-fail/unwind-box-vec.rs
+++ b/src/test/run-fail/unwind-box-vec.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn failfn() {
     fail!();
 }
diff --git a/src/test/run-fail/unwind-box.rs b/src/test/run-fail/unwind-box.rs
index 21308945253..6cbccfb29f9 100644
--- a/src/test/run-fail/unwind-box.rs
+++ b/src/test/run-fail/unwind-box.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn failfn() {
     fail!();
 }
diff --git a/src/test/run-fail/unwind-fail.rs b/src/test/run-fail/unwind-fail.rs
index 4d4bc0d53eb..4acd1ba6b1b 100644
--- a/src/test/run-fail/unwind-fail.rs
+++ b/src/test/run-fail/unwind-fail.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn main() {
     @0;
     fail!();
diff --git a/src/test/run-fail/unwind-iter.rs b/src/test/run-fail/unwind-iter.rs
index 1f5e455564e..9b5b9be3415 100644
--- a/src/test/run-fail/unwind-iter.rs
+++ b/src/test/run-fail/unwind-iter.rs
@@ -10,6 +10,7 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
 #[allow(unreachable_code)];
 #[allow(unused_variable)];
 
diff --git a/src/test/run-fail/unwind-iter2.rs b/src/test/run-fail/unwind-iter2.rs
index d0726d2544c..0ac8b2b26e9 100644
--- a/src/test/run-fail/unwind-iter2.rs
+++ b/src/test/run-fail/unwind-iter2.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn x(it: |int|) {
     let _a = @0;
     it(1);
diff --git a/src/test/run-fail/unwind-match.rs b/src/test/run-fail/unwind-match.rs
index a9761017c73..44cc3145c44 100644
--- a/src/test/run-fail/unwind-match.rs
+++ b/src/test/run-fail/unwind-match.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 // Issue #945
 // error-pattern:non-exhaustive match failure
 fn test_box() {
diff --git a/src/test/run-fail/unwind-misc-1.rs b/src/test/run-fail/unwind-misc-1.rs
index d215927c7d0..b87303467ce 100644
--- a/src/test/run-fail/unwind-misc-1.rs
+++ b/src/test/run-fail/unwind-misc-1.rs
@@ -11,6 +11,8 @@
 // exec-env:RUST_NEWRT=1
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn main() {
     let _count = @mut 0u;
     let mut map = std::hashmap::HashMap::new();
diff --git a/src/test/run-fail/unwind-nested.rs b/src/test/run-fail/unwind-nested.rs
index f8a63be2e9a..3805f955d73 100644
--- a/src/test/run-fail/unwind-nested.rs
+++ b/src/test/run-fail/unwind-nested.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn main() {
     let _a = @0;
     {
diff --git a/src/test/run-fail/unwind-partial-box.rs b/src/test/run-fail/unwind-partial-box.rs
index 88f71a5ed7c..7239cad762d 100644
--- a/src/test/run-fail/unwind-partial-box.rs
+++ b/src/test/run-fail/unwind-partial-box.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn f() -> ~[int] { fail!(); }
 
 // Voodoo. In unwind-alt we had to do this to trigger the bug. Might
diff --git a/src/test/run-fail/unwind-partial-unique.rs b/src/test/run-fail/unwind-partial-unique.rs
index e9bbbd46c03..6339e72fe46 100644
--- a/src/test/run-fail/unwind-partial-unique.rs
+++ b/src/test/run-fail/unwind-partial-unique.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn f() -> ~[int] { fail!(); }
 
 // Voodoo. In unwind-alt we had to do this to trigger the bug. Might
diff --git a/src/test/run-fail/unwind-partial-vec.rs b/src/test/run-fail/unwind-partial-vec.rs
index 3d6d26937db..9560e0275d4 100644
--- a/src/test/run-fail/unwind-partial-vec.rs
+++ b/src/test/run-fail/unwind-partial-vec.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn f() -> ~[int] { fail!(); }
 
 // Voodoo. In unwind-alt we had to do this to trigger the bug. Might
diff --git a/src/test/run-fail/unwind-stacked.rs b/src/test/run-fail/unwind-stacked.rs
index 8249807af74..bd875ada18e 100644
--- a/src/test/run-fail/unwind-stacked.rs
+++ b/src/test/run-fail/unwind-stacked.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn f() {
     let _a = @0;
     fail!();
diff --git a/src/test/run-fail/unwind-uninitialized.rs b/src/test/run-fail/unwind-uninitialized.rs
index d5a06ffb903..265a616f3de 100644
--- a/src/test/run-fail/unwind-uninitialized.rs
+++ b/src/test/run-fail/unwind-uninitialized.rs
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+#[feature(managed_boxes)];
+
 fn f() {
     fail!();
 }
diff --git a/src/test/run-pass/auto-ref-slice-plus-ref.rs b/src/test/run-pass/auto-ref-slice-plus-ref.rs
index 2b9870b84a5..667d9b738c2 100644
--- a/src/test/run-pass/auto-ref-slice-plus-ref.rs
+++ b/src/test/run-pass/auto-ref-slice-plus-ref.rs
@@ -11,6 +11,8 @@
 // Testing that method lookup automatically both borrows vectors to slices
 // and also references them to create the &self pointer
 
+#[feature(managed_boxes)];
+
 trait MyIter {
     fn test_imm(&self);
 }
diff --git a/src/test/run-pass/autoderef-method-twice.rs b/src/test/run-pass/autoderef-method-twice.rs
index f93f0605269..79784688d49 100644
--- a/src/test/run-pass/autoderef-method-twice.rs
+++ b/src/test/run-pass/autoderef-method-twice.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 trait double {
     fn double(@self) -> uint;
 }
diff --git a/src/test/run-pass/autoderef-method.rs b/src/test/run-pass/autoderef-method.rs
index eb173e3d5f8..1a04abe3196 100644
--- a/src/test/run-pass/autoderef-method.rs
+++ b/src/test/run-pass/autoderef-method.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 trait double {
     fn double(@self) -> uint;
 }
diff --git a/src/test/run-pass/borrowck-borrow-from-at-vec.rs b/src/test/run-pass/borrowck-borrow-from-at-vec.rs
index 8ec1b590fdf..5ae959ef169 100644
--- a/src/test/run-pass/borrowck-borrow-from-at-vec.rs
+++ b/src/test/run-pass/borrowck-borrow-from-at-vec.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 fn sum_slice(x: &[int]) -> int {
     let mut sum = 0;
     for i in x.iter() { sum += *i; }
diff --git a/src/test/run-pass/borrowck-preserve-box-in-discr.rs b/src/test/run-pass/borrowck-preserve-box-in-discr.rs
index c155563d8d0..0f37288d51d 100644
--- a/src/test/run-pass/borrowck-preserve-box-in-discr.rs
+++ b/src/test/run-pass/borrowck-preserve-box-in-discr.rs
@@ -10,6 +10,8 @@
 
 // exec-env:RUST_POISON_ON_FREE=1
 
+#[feature(managed_boxes)];
+
 use std::ptr;
 
 struct F { f: ~int }
diff --git a/src/test/run-pass/borrowck-preserve-box-in-field.rs b/src/test/run-pass/borrowck-preserve-box-in-field.rs
index 1caf5c03376..77fe7d14dcb 100644
--- a/src/test/run-pass/borrowck-preserve-box-in-field.rs
+++ b/src/test/run-pass/borrowck-preserve-box-in-field.rs
@@ -12,6 +12,8 @@
 
 // exec-env:RUST_POISON_ON_FREE=1
 
+#[feature(managed_boxes)];
+
 use std::ptr;
 
 fn borrow(x: &int, f: |x: &int|) {
diff --git a/src/test/run-pass/borrowck-preserve-box-in-pat.rs b/src/test/run-pass/borrowck-preserve-box-in-pat.rs
index fd5f8c0868c..2fd2c689a3c 100644
--- a/src/test/run-pass/borrowck-preserve-box-in-pat.rs
+++ b/src/test/run-pass/borrowck-preserve-box-in-pat.rs
@@ -10,6 +10,8 @@
 
 // exec-env:RUST_POISON_ON_FREE=1
 
+#[feature(managed_boxes)];
+
 use std::ptr;
 
 struct F { f: ~int }
diff --git a/src/test/run-pass/borrowck-preserve-box-in-uniq.rs b/src/test/run-pass/borrowck-preserve-box-in-uniq.rs
index 2b8180be00e..d950fce109b 100644
--- a/src/test/run-pass/borrowck-preserve-box-in-uniq.rs
+++ b/src/test/run-pass/borrowck-preserve-box-in-uniq.rs
@@ -12,6 +12,8 @@
 
 // exec-env:RUST_POISON_ON_FREE=1
 
+#[feature(managed_boxes)];
+
 use std::ptr;
 
 fn borrow(x: &int, f: |x: &int|) {
diff --git a/src/test/run-pass/borrowck-preserve-box.rs b/src/test/run-pass/borrowck-preserve-box.rs
index 2acaf54f05f..5c0f238e0bc 100644
--- a/src/test/run-pass/borrowck-preserve-box.rs
+++ b/src/test/run-pass/borrowck-preserve-box.rs
@@ -12,6 +12,8 @@
 
 // exec-env:RUST_POISON_ON_FREE=1
 
+#[feature(managed_boxes)];
+
 use std::ptr;
 
 fn borrow(x: &int, f: |x: &int|) {
diff --git a/src/test/run-pass/borrowck-preserve-cond-box.rs b/src/test/run-pass/borrowck-preserve-cond-box.rs
index 055a924cf04..57365e98f97 100644
--- a/src/test/run-pass/borrowck-preserve-cond-box.rs
+++ b/src/test/run-pass/borrowck-preserve-cond-box.rs
@@ -10,6 +10,8 @@
 
 // exec-env:RUST_POISON_ON_FREE=1
 
+#[feature(managed_boxes)];
+
 fn testfn(cond: bool) {
     let mut x = @3;
     let mut y = @4;
diff --git a/src/test/run-pass/borrowck-preserve-expl-deref.rs b/src/test/run-pass/borrowck-preserve-expl-deref.rs
index 4400b03e313..e820ec67d6f 100644
--- a/src/test/run-pass/borrowck-preserve-expl-deref.rs
+++ b/src/test/run-pass/borrowck-preserve-expl-deref.rs
@@ -12,6 +12,8 @@
 
 // exec-env:RUST_POISON_ON_FREE=1
 
+#[feature(managed_boxes)];
+
 use std::ptr;
 
 fn borrow(x: &int, f: |x: &int|) {
diff --git a/src/test/run-pass/borrowck-univariant-enum.rs b/src/test/run-pass/borrowck-univariant-enum.rs
index bb8710aad48..aaa08ea49b3 100644
--- a/src/test/run-pass/borrowck-univariant-enum.rs
+++ b/src/test/run-pass/borrowck-univariant-enum.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 enum newtype {
     newtype(int)
 }
diff --git a/src/test/run-pass/borrowck-wg-autoderef-and-autoborrowvec-combined-issue-6272.rs b/src/test/run-pass/borrowck-wg-autoderef-and-autoborrowvec-combined-issue-6272.rs
index 4ee0d42ae13..27d337a28bf 100644
--- a/src/test/run-pass/borrowck-wg-autoderef-and-autoborrowvec-combined-issue-6272.rs
+++ b/src/test/run-pass/borrowck-wg-autoderef-and-autoborrowvec-combined-issue-6272.rs
@@ -26,6 +26,7 @@
 //
 // run-fail/borrowck-wg-autoderef-and-autoborrowvec-combined-fail-issue-6272.rs
 
+#[feature(managed_boxes)];
 
 pub fn main() {
     let a = @mut 3i;
diff --git a/src/test/run-pass/borrowck-wg-simple.rs b/src/test/run-pass/borrowck-wg-simple.rs
index c07962e10aa..f561dba2423 100644
--- a/src/test/run-pass/borrowck-wg-simple.rs
+++ b/src/test/run-pass/borrowck-wg-simple.rs
@@ -1,3 +1,5 @@
+#[feature(managed_boxes)];
+
 fn f(x: &int) {
     println(x.to_str());
 }
diff --git a/src/test/run-pass/borrowck-wg-two-imm-borrows.rs b/src/test/run-pass/borrowck-wg-two-imm-borrows.rs
index 3d2988202f3..efd0572c8c6 100644
--- a/src/test/run-pass/borrowck-wg-two-imm-borrows.rs
+++ b/src/test/run-pass/borrowck-wg-two-imm-borrows.rs
@@ -1,5 +1,7 @@
 // Test that we can borrow the same @mut box twice, so long as both are imm.
 
+#[feature(managed_boxes)];
+
 fn add(x:&int, y:&int)
 {
     *x + *y;
diff --git a/src/test/run-pass/borrowed-ptr-pattern-infallible.rs b/src/test/run-pass/borrowed-ptr-pattern-infallible.rs
index 4e9ba6d3158..77484b8da4a 100644
--- a/src/test/run-pass/borrowed-ptr-pattern-infallible.rs
+++ b/src/test/run-pass/borrowed-ptr-pattern-infallible.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 pub fn main() {
     let (&x, &y, &z) = (&3, &'a', &@"No pets!");
     assert_eq!(x, 3);
diff --git a/src/test/run-pass/cci_borrow.rs b/src/test/run-pass/cci_borrow.rs
index fe57d6b3fec..6b8f4089fdf 100644
--- a/src/test/run-pass/cci_borrow.rs
+++ b/src/test/run-pass/cci_borrow.rs
@@ -11,6 +11,8 @@
 // xfail-fast - check-fast doesn't understand aux-build
 // aux-build:cci_borrow_lib.rs
 
+#[feature(managed_boxes)];
+
 extern mod cci_borrow_lib;
 use cci_borrow_lib::foo;
 
diff --git a/src/test/run-pass/deref-lval.rs b/src/test/run-pass/deref-lval.rs
index e7a307c4a22..997e2f03abd 100644
--- a/src/test/run-pass/deref-lval.rs
+++ b/src/test/run-pass/deref-lval.rs
@@ -8,6 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
+#[feature(managed_boxes)];
 
 pub fn main() { let x = @mut 5; *x = 1000; info!("{:?}", *x); }
diff --git a/src/test/run-pass/deriving-encodable-decodable.rs b/src/test/run-pass/deriving-encodable-decodable.rs
index 5f3cebed667..e9620d4dea4 100644
--- a/src/test/run-pass/deriving-encodable-decodable.rs
+++ b/src/test/run-pass/deriving-encodable-decodable.rs
@@ -13,7 +13,7 @@
 
 // xfail-fast
 
-#[feature(struct_variant)];
+#[feature(struct_variant, managed_boxes)];
 
 extern mod extra;
 
diff --git a/src/test/run-pass/expr-block-box.rs b/src/test/run-pass/expr-block-box.rs
index af1fab2b595..6d6a2a60af0 100644
--- a/src/test/run-pass/expr-block-box.rs
+++ b/src/test/run-pass/expr-block-box.rs
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-
+#[feature(managed_boxes)];
 
 pub fn main() { let x = { @100 }; assert!((*x == 100)); }
diff --git a/src/test/run-pass/expr-block-ref.rs b/src/test/run-pass/expr-block-ref.rs
index c77cad8858e..8ed2a9a6b3f 100644
--- a/src/test/run-pass/expr-block-ref.rs
+++ b/src/test/run-pass/expr-block-ref.rs
@@ -8,5 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 // Regression test for issue #388
 pub fn main() { let _x = { { @10 } }; }
diff --git a/src/test/run-pass/expr-elseif-ref2.rs b/src/test/run-pass/expr-elseif-ref2.rs
index 96acaf43e34..3149ed49f7e 100644
--- a/src/test/run-pass/expr-elseif-ref2.rs
+++ b/src/test/run-pass/expr-elseif-ref2.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 // Regression test for issue #388
 pub fn main() {
     let _x = if false {
diff --git a/src/test/run-pass/expr-if-box.rs b/src/test/run-pass/expr-if-box.rs
index d31723f9c6c..b83c7b8852c 100644
--- a/src/test/run-pass/expr-if-box.rs
+++ b/src/test/run-pass/expr-if-box.rs
@@ -8,9 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-
-
+#[feature(managed_boxes)];
 
 // Tests for if as expressions returning boxed types
 fn test_box() {
diff --git a/src/test/run-pass/expr-match-box.rs b/src/test/run-pass/expr-match-box.rs
index 5e6abc3e786..8557f409b75 100644
--- a/src/test/run-pass/expr-match-box.rs
+++ b/src/test/run-pass/expr-match-box.rs
@@ -8,9 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-
-
+#[feature(managed_boxes)];
 
 // Tests for match as expressions resulting in boxed types
 fn test_box() {
diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs
index e16cfecb694..163a1253ef0 100644
--- a/src/test/run-pass/hashmap-memory.rs
+++ b/src/test/run-pass/hashmap-memory.rs
@@ -10,6 +10,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 /**
    A somewhat reduced test case to expose some Valgrind issues.
 
diff --git a/src/test/run-pass/intrinsic-move-val.rs b/src/test/run-pass/intrinsic-move-val.rs
index f328c484478..1d2b0197f08 100644
--- a/src/test/run-pass/intrinsic-move-val.rs
+++ b/src/test/run-pass/intrinsic-move-val.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 mod rusti {
     extern "rust-intrinsic" {
         pub fn move_val_init<T>(dst: &mut T, src: T);
diff --git a/src/test/run-pass/issue-2708.rs b/src/test/run-pass/issue-2708.rs
index 1fce8e5ce49..e4d7483c5cf 100644
--- a/src/test/run-pass/issue-2708.rs
+++ b/src/test/run-pass/issue-2708.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 struct Font {
     fontbuf: uint,
     cairo_font: uint,
diff --git a/src/test/run-pass/issue-3012-2.rs b/src/test/run-pass/issue-3012-2.rs
index c57257502e4..9d379e8bfe7 100644
--- a/src/test/run-pass/issue-3012-2.rs
+++ b/src/test/run-pass/issue-3012-2.rs
@@ -10,6 +10,9 @@
 
 // xfail-fast
 // aux-build:issue-3012-1.rs
+
+#[feature(managed_boxes)];
+
 extern mod socketlib;
 
 use socketlib::socket;
diff --git a/src/test/run-pass/issue-3860.rs b/src/test/run-pass/issue-3860.rs
index ee9516e552e..8a30cc96748 100644
--- a/src/test/run-pass/issue-3860.rs
+++ b/src/test/run-pass/issue-3860.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 struct Foo { x: int }
 
 impl Foo {
diff --git a/src/test/run-pass/issue-4092.rs b/src/test/run-pass/issue-4092.rs
index 919c1f7ad18..62174a70d07 100644
--- a/src/test/run-pass/issue-4092.rs
+++ b/src/test/run-pass/issue-4092.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 use std::hashmap::HashMap;
 
 pub fn main() {
diff --git a/src/test/run-pass/issue-5517.rs b/src/test/run-pass/issue-5517.rs
index d63d8b13b43..a5c318a20f4 100644
--- a/src/test/run-pass/issue-5517.rs
+++ b/src/test/run-pass/issue-5517.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 pub fn main() {
     let box1 = @mut 42;
     let _x = *(&mut *box1) == 42 || *(&mut *box1) == 31337;
diff --git a/src/test/run-pass/issue-5926.rs b/src/test/run-pass/issue-5926.rs
index dbaa5460fd0..ffb7a0a5bb3 100644
--- a/src/test/run-pass/issue-5926.rs
+++ b/src/test/run-pass/issue-5926.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
 #[allow(unused_mut)];
 
 pub fn main() {
diff --git a/src/test/run-pass/issue-6117.rs b/src/test/run-pass/issue-6117.rs
index 73e9391f016..6b68e3c9ed7 100644
--- a/src/test/run-pass/issue-6117.rs
+++ b/src/test/run-pass/issue-6117.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 pub fn main() {
     match Left(@17) {
         Right(()) => {}
diff --git a/src/test/run-pass/issue-8898.rs b/src/test/run-pass/issue-8898.rs
index 07731020d34..ecb8e3ca0ed 100644
--- a/src/test/run-pass/issue-8898.rs
+++ b/src/test/run-pass/issue-8898.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
 
 fn assert_repr_eq<T>(obj : T, expected : ~str) {
 
diff --git a/src/test/run-pass/issue-9382.rs b/src/test/run-pass/issue-9382.rs
index d2bf6e29f87..a5f87e6c536 100644
--- a/src/test/run-pass/issue-9382.rs
+++ b/src/test/run-pass/issue-9382.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
 #[allow(unnecessary_allocation)];
 
 // Tests for a previous bug that occured due to an interaction
diff --git a/src/test/run-pass/lambda-infer-unresolved.rs b/src/test/run-pass/lambda-infer-unresolved.rs
index b6ee2d10fb3..a499c148025 100644
--- a/src/test/run-pass/lambda-infer-unresolved.rs
+++ b/src/test/run-pass/lambda-infer-unresolved.rs
@@ -11,6 +11,7 @@
 // This should typecheck even though the type of e is not fully
 // resolved when we finish typechecking the ||.
 
+#[feature(managed_boxes)];
 
 struct Refs { refs: ~[int], n: int }
 
diff --git a/src/test/run-pass/let-destruct.rs b/src/test/run-pass/let-destruct.rs
index aab19b31397..a1453a38455 100644
--- a/src/test/run-pass/let-destruct.rs
+++ b/src/test/run-pass/let-destruct.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 struct xx(int);
 
 struct X { x: xx, y: int }
diff --git a/src/test/run-pass/move-2.rs b/src/test/run-pass/move-2.rs
index fb5f3e11ab7..14d4ea3ff35 100644
--- a/src/test/run-pass/move-2.rs
+++ b/src/test/run-pass/move-2.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
 
 struct X { x: int, y: int, z: int }
 
diff --git a/src/test/run-pass/nested-exhaustive-match.rs b/src/test/run-pass/nested-exhaustive-match.rs
index fa4bec0271f..aa25d13e0cd 100644
--- a/src/test/run-pass/nested-exhaustive-match.rs
+++ b/src/test/run-pass/nested-exhaustive-match.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 struct Foo { foo: bool, bar: Option<int>, baz: int }
 
 pub fn main() {
diff --git a/src/test/run-pass/rcvr-borrowed-to-region.rs b/src/test/run-pass/rcvr-borrowed-to-region.rs
index 7d07cab433f..d6d015d4785 100644
--- a/src/test/run-pass/rcvr-borrowed-to-region.rs
+++ b/src/test/run-pass/rcvr-borrowed-to-region.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 trait get {
     fn get(self) -> int;
 }
diff --git a/src/test/run-pass/regions-appearance-constraint.rs b/src/test/run-pass/regions-appearance-constraint.rs
index 2297277fdc0..3b0a457559c 100644
--- a/src/test/run-pass/regions-appearance-constraint.rs
+++ b/src/test/run-pass/regions-appearance-constraint.rs
@@ -10,6 +10,8 @@
 
 /* Tests conditional rooting of the box y */
 
+#[feature(managed_boxes)];
+
 fn testfn(cond: bool) {
     let mut x = @3;
     let mut y = @4;
diff --git a/src/test/run-pass/regions-borrow-at.rs b/src/test/run-pass/regions-borrow-at.rs
index b4ec9914f26..5b1b1dd8ec3 100644
--- a/src/test/run-pass/regions-borrow-at.rs
+++ b/src/test/run-pass/regions-borrow-at.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 fn foo(x: &uint) -> uint {
     *x
 }
diff --git a/src/test/run-pass/regions-borrow-evec-at.rs b/src/test/run-pass/regions-borrow-evec-at.rs
index 45e5b1ad9c9..3c0fcba2064 100644
--- a/src/test/run-pass/regions-borrow-evec-at.rs
+++ b/src/test/run-pass/regions-borrow-evec-at.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 fn foo(x: &[uint]) -> uint {
     x[0]
 }
diff --git a/src/test/run-pass/regions-escape-into-other-fn.rs b/src/test/run-pass/regions-escape-into-other-fn.rs
index 986071ec535..8ccda6824bd 100644
--- a/src/test/run-pass/regions-escape-into-other-fn.rs
+++ b/src/test/run-pass/regions-escape-into-other-fn.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 fn foo<'r>(x: &'r uint) -> &'r uint { x }
 fn bar(x: &uint) -> uint { *x }
 
diff --git a/src/test/run-pass/regions-infer-borrow-scope-within-loop-ok.rs b/src/test/run-pass/regions-infer-borrow-scope-within-loop-ok.rs
index db4a51bbf22..1f21ca9ef1b 100644
--- a/src/test/run-pass/regions-infer-borrow-scope-within-loop-ok.rs
+++ b/src/test/run-pass/regions-infer-borrow-scope-within-loop-ok.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 fn borrow<'r, T>(x: &'r T) -> &'r T {x}
 
 pub fn main() {
diff --git a/src/test/run-pass/regions-infer-borrow-scope.rs b/src/test/run-pass/regions-infer-borrow-scope.rs
index 6bd3fa5a73b..7db4ce8caf2 100644
--- a/src/test/run-pass/regions-infer-borrow-scope.rs
+++ b/src/test/run-pass/regions-infer-borrow-scope.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 struct Point {x: int, y: int}
 
 fn x_coord<'r>(p: &'r Point) -> &'r int {
diff --git a/src/test/run-pass/repeated-vector-syntax.rs b/src/test/run-pass/repeated-vector-syntax.rs
index 465c9b7090e..03497de0d55 100644
--- a/src/test/run-pass/repeated-vector-syntax.rs
+++ b/src/test/run-pass/repeated-vector-syntax.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 #[deriving(Clone)]
 struct Foo {
     a: ~str,
diff --git a/src/test/run-pass/struct-field-assignability.rs b/src/test/run-pass/struct-field-assignability.rs
index 86656b011dd..da00e1595de 100644
--- a/src/test/run-pass/struct-field-assignability.rs
+++ b/src/test/run-pass/struct-field-assignability.rs
@@ -1,3 +1,5 @@
+#[feature(managed_boxes)];
+
 struct Foo<'a> {
     x: &'a int
 }
diff --git a/src/test/run-pass/type-param-constraints.rs b/src/test/run-pass/type-param-constraints.rs
index a1cb0063322..e721a9a96db 100644
--- a/src/test/run-pass/type-param-constraints.rs
+++ b/src/test/run-pass/type-param-constraints.rs
@@ -10,6 +10,8 @@
 
 // xfail-fast
 
+#[feature(managed_boxes)];
+
 fn p_foo<T>(_pinned: T) { }
 fn s_foo<T>(_shared: T) { }
 fn u_foo<T:Send>(_unique: T) { }
diff --git a/src/test/run-pass/unique-assign-generic.rs b/src/test/run-pass/unique-assign-generic.rs
index eb2638f2568..8fb2b9b40f4 100644
--- a/src/test/run-pass/unique-assign-generic.rs
+++ b/src/test/run-pass/unique-assign-generic.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 fn f<T>(t: T) -> T {
     let t1 = t;
     t1
diff --git a/src/test/run-pass/unique-copy-box.rs b/src/test/run-pass/unique-copy-box.rs
index d84ebe0ba76..48a49996aee 100644
--- a/src/test/run-pass/unique-copy-box.rs
+++ b/src/test/run-pass/unique-copy-box.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
 #[allow(unused_variable)];
 
 use std::managed;
diff --git a/src/test/run-pass/unwind-box.rs b/src/test/run-pass/unwind-box.rs
index 2b3e44a6529..173919608de 100644
--- a/src/test/run-pass/unwind-box.rs
+++ b/src/test/run-pass/unwind-box.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 extern mod extra;
 
 use std::task;
diff --git a/src/test/run-pass/vec-matching-autoslice.rs b/src/test/run-pass/vec-matching-autoslice.rs
index acd1d63a6ed..cd9d9603ffb 100644
--- a/src/test/run-pass/vec-matching-autoslice.rs
+++ b/src/test/run-pass/vec-matching-autoslice.rs
@@ -1,3 +1,5 @@
+#[feature(managed_boxes)];
+
 pub fn main() {
     let x = @[1, 2, 3];
     match x {
diff --git a/src/test/run-pass/vec-to_str.rs b/src/test/run-pass/vec-to_str.rs
index a24ef38b283..16a895f7231 100644
--- a/src/test/run-pass/vec-to_str.rs
+++ b/src/test/run-pass/vec-to_str.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[feature(managed_boxes)];
+
 pub fn main() {
     assert_eq!((~[0, 1]).to_str(), ~"[0, 1]");
     assert_eq!((&[1, 2]).to_str(), ~"[1, 2]");