diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index ac8cf543a423a..9a5665e683934 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -9,7 +9,9 @@ // except according to those terms. #![crate_type = "bin"] -#![feature(slicing_syntax)] +#![allow(unknown_features)] +#![feature(slicing_syntax, unboxed_closures)] +#![feature(box_syntax)] #![deny(warnings)] diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index b42337a898294..fdc3b52c4d32f 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -49,6 +49,15 @@ pub static HEAP: () = (); #[stable] pub struct Box(Unique); +#[unstable] +impl Box { + /// Moves `x` into a freshly allocated box on the global exchange heap. + #[unstable] + pub fn new(x: T) -> Box { + box x + } +} + #[stable] impl Default for Box { #[stable] @@ -186,27 +195,27 @@ impl DerefMut for Box { mod test { #[test] fn test_owned_clone() { - let a = box 5i; + let a = Box::new(5i); let b: Box = a.clone(); assert!(a == b); } #[test] fn any_move() { - let a = box 8u as Box; - let b = box Test as Box; + let a = Box::new(8u) as Box; + let b = Box::new(Test) as Box; match a.downcast::() { - Ok(a) => { assert!(a == box 8u); } + Ok(a) => { assert!(a == Box::new(8u)); } Err(..) => panic!() } match b.downcast::() { - Ok(a) => { assert!(a == box Test); } + Ok(a) => { assert!(a == Box::new(Test)); } Err(..) => panic!() } - let a = box 8u as Box; - let b = box Test as Box; + let a = Box::new(8u) as Box; + let b = Box::new(Test) as Box; assert!(a.downcast::>().is_err()); assert!(b.downcast::>().is_err()); @@ -214,8 +223,8 @@ mod test { #[test] fn test_show() { - let a = box 8u as Box; - let b = box Test as Box; + let a = Box::new(8u) as Box; + let b = Box::new(Test) as Box; let a_str = a.to_str(); let b_str = b.to_str(); assert_eq!(a_str, "Box"); @@ -232,6 +241,6 @@ mod test { #[test] fn deref() { fn homura>(_: T) { } - homura(box 765i32); + homura(Box::new(765i32)); } } diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index dc6037c3c0c29..0bb8ba669ec25 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -67,6 +67,7 @@ #![no_std] #![allow(unknown_features)] #![feature(lang_items, unsafe_destructor)] +#![feature(box_syntax)] #[macro_use] extern crate core; diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index a3adc09b581cb..7692c1558a70f 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -24,6 +24,7 @@ #![allow(unknown_features)] #![feature(unsafe_destructor, slicing_syntax)] +#![feature(box_syntax)] #![feature(unboxed_closures)] #![feature(old_impl_check)] #![no_std] diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index 036663ad8f565..0d5f6b65827a4 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -164,7 +164,10 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/", html_playground_url = "http://play.rust-lang.org/")] + +#![allow(unknown_features)] #![feature(slicing_syntax)] +#![feature(box_syntax)] #![deny(missing_docs)] extern crate regex; diff --git a/src/libregex/lib.rs b/src/libregex/lib.rs index bd376528a0e51..d19ce3b460ae5 100644 --- a/src/libregex/lib.rs +++ b/src/libregex/lib.rs @@ -25,6 +25,7 @@ #![allow(unknown_features)] #![feature(slicing_syntax)] +#![feature(box_syntax)] #![deny(missing_docs)] #[cfg(test)] diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 5525874a61450..e0143917a7cff 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -26,6 +26,7 @@ #![allow(unknown_features)] #![feature(quote)] #![feature(slicing_syntax, unsafe_destructor)] +#![feature(box_syntax)] #![feature(rustc_diagnostic_macros)] #![feature(old_impl_check)] diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index f3a934857ec2b..27e1eaacdfd99 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -23,8 +23,10 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/")] +#![allow(unknown_features)] #![feature(quote)] #![feature(slicing_syntax, unsafe_destructor)] +#![feature(box_syntax)] #![feature(rustc_diagnostic_macros)] extern crate arena; diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index 961d3a6cfa1ee..4a281c413d6fc 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -22,7 +22,9 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/")] +#![allow(unknown_features)] #![feature(link_args)] +#![feature(box_syntax)] extern crate libc; diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs index 3497ff2221c19..5da51697d2fee 100644 --- a/src/librustc_trans/lib.rs +++ b/src/librustc_trans/lib.rs @@ -23,8 +23,10 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/")] +#![allow(unknown_features)] #![feature(quote)] #![feature(slicing_syntax, unsafe_destructor)] +#![feature(box_syntax)] #![feature(rustc_diagnostic_macros)] extern crate arena; diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index d119885f1605e..76ac4b2e8af4c 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -72,8 +72,10 @@ This API is completely unstable and subject to change. html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/")] +#![allow(unknown_features)] #![feature(quote)] #![feature(slicing_syntax, unsafe_destructor)] +#![feature(box_syntax)] #![feature(rustc_diagnostic_macros)] #![allow(non_camel_case_types)] diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index daa930fddcb8c..56f5c23f6f1bb 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -18,6 +18,7 @@ html_root_url = "http://doc.rust-lang.org/nightly/", html_playground_url = "http://play.rust-lang.org/")] #![feature(slicing_syntax)] +#![feature(box_syntax)] extern crate arena; extern crate getopts; diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs index d51f070632fd3..b3c4cec2ef13f 100644 --- a/src/libserialize/lib.rs +++ b/src/libserialize/lib.rs @@ -25,6 +25,7 @@ Core encoding and decoding interfaces. html_playground_url = "http://play.rust-lang.org/")] #![allow(unknown_features)] #![cfg_attr(stage0, allow(unused_attributes))] +#![feature(box_syntax)] #![feature(old_impl_check)] #![feature(slicing_syntax)] diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 316ea65af8735..71221a654e8c1 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -108,6 +108,7 @@ #![feature(linkage, thread_local, asm)] #![feature(lang_items, unsafe_destructor)] #![feature(slicing_syntax, unboxed_closures)] +#![feature(box_syntax)] #![feature(old_impl_check)] // Don't link to std. We are std. diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 21d3e4fef7f96..2cfcd38d48fca 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -69,7 +69,8 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[ ("tuple_indexing", Accepted), ("associated_types", Accepted), ("visible_private_types", Active), - ("slicing_syntax", Accepted), + ("slicing_syntax", Active), + ("box_syntax", Active), ("if_let", Accepted), ("while_let", Accepted), @@ -337,6 +338,15 @@ 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, _) => { + self.gate_feature("box_syntax", + e.span, + "box expression syntax is experimental in alpha release; \ + you can call `Box::new` instead."); + } + _ => {} + } visit::walk_expr(self, e); } @@ -357,6 +367,11 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> { but at the end of a slice (e.g. \ `[0, ..xs, 0]` are experimental") } + ast::PatBox(..) => { + self.gate_feature("box_syntax", + pattern.span, + "box pattern syntax is experimental in alpha release"); + } _ => {} } visit::walk_pat(self, pattern) diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 1823700fbf4fe..1efd6a87f863f 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -25,6 +25,7 @@ #![allow(unknown_features)] #![feature(slicing_syntax)] +#![feature(box_syntax)] #![feature(quote, unsafe_destructor)] extern crate arena; diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index 44ae00d997c5f..b4f224cb4a7ce 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -50,6 +50,7 @@ #![allow(unknown_features)] #![feature(slicing_syntax)] +#![feature(box_syntax)] #![deny(missing_docs)] #[macro_use] extern crate log; diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index b6fc6462aa4bf..d04308814f85b 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -31,7 +31,9 @@ #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/")] +#![allow(unknown_features)] #![feature(asm, slicing_syntax)] +#![feature(box_syntax)] extern crate getopts; extern crate regex; diff --git a/src/test/auxiliary/cci_nested_lib.rs b/src/test/auxiliary/cci_nested_lib.rs index 44d001d45fda2..8494917c615eb 100644 --- a/src/test/auxiliary/cci_nested_lib.rs +++ b/src/test/auxiliary/cci_nested_lib.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] use std::cell::RefCell; diff --git a/src/test/auxiliary/issue-2380.rs b/src/test/auxiliary/issue-2380.rs index af6bb050ef5a0..8eb6cd6e26318 100644 --- a/src/test/auxiliary/issue-2380.rs +++ b/src/test/auxiliary/issue-2380.rs @@ -11,6 +11,8 @@ #![crate_name="a"] #![crate_type = "lib"] +#![allow(unknown_features)] +#![feature(box_syntax)] pub trait i { } diff --git a/src/test/auxiliary/method_self_arg1.rs b/src/test/auxiliary/method_self_arg1.rs index 37022131c3d94..5865a8f467bad 100644 --- a/src/test/auxiliary/method_self_arg1.rs +++ b/src/test/auxiliary/method_self_arg1.rs @@ -10,6 +10,9 @@ #![crate_type = "lib"] +#![allow(unknown_features)] +#![feature(box_syntax)] + static mut COUNT: u64 = 1; pub fn get_count() -> u64 { unsafe { COUNT } } diff --git a/src/test/auxiliary/method_self_arg2.rs b/src/test/auxiliary/method_self_arg2.rs index eb4d62b01ad1a..a28a877a374bd 100644 --- a/src/test/auxiliary/method_self_arg2.rs +++ b/src/test/auxiliary/method_self_arg2.rs @@ -10,6 +10,9 @@ #![crate_type = "lib"] +#![allow(unknown_features)] +#![feature(box_syntax)] + static mut COUNT: u64 = 1; pub fn get_count() -> u64 { unsafe { COUNT } } diff --git a/src/test/compile-fail/autoderef-full-lval.rs b/src/test/compile-fail/autoderef-full-lval.rs index bbe5af1b51675..fb58028658e1b 100644 --- a/src/test/compile-fail/autoderef-full-lval.rs +++ b/src/test/compile-fail/autoderef-full-lval.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct clam { x: Box, y: Box, diff --git a/src/test/compile-fail/borrow-tuple-fields.rs b/src/test/compile-fail/borrow-tuple-fields.rs index 1d09143c24d1d..59ed0e5fa0630 100644 --- a/src/test/compile-fail/borrow-tuple-fields.rs +++ b/src/test/compile-fail/borrow-tuple-fields.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct Foo(Box, int); struct Bar(int, int); diff --git a/src/test/compile-fail/borrowck-array-double-move.rs b/src/test/compile-fail/borrowck-array-double-move.rs index c872d0dc4b9c4..ef2c629acfebd 100644 --- a/src/test/compile-fail/borrowck-array-double-move.rs +++ b/src/test/compile-fail/borrowck-array-double-move.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn f() { let mut a = [box 0i, box 1i]; drop(a[0]); 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 924d70e9f46c6..d955e8984bf39 100644 --- a/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs +++ b/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + use std::ops::Add; #[derive(Clone)] diff --git a/src/test/compile-fail/borrowck-vec-pattern-nesting.rs b/src/test/compile-fail/borrowck-vec-pattern-nesting.rs index 2eec788785605..c0abc3a25606a 100644 --- a/src/test/compile-fail/borrowck-vec-pattern-nesting.rs +++ b/src/test/compile-fail/borrowck-vec-pattern-nesting.rs @@ -9,6 +9,7 @@ // except according to those terms. #![feature(advanced_slice_patterns)] +#![feature(box_syntax)] fn a() { let mut vec = [box 1i, box 2, box 3]; diff --git a/src/test/compile-fail/destructure-trait-ref.rs b/src/test/compile-fail/destructure-trait-ref.rs index a2a5a3e257f29..0351040d329c4 100644 --- a/src/test/compile-fail/destructure-trait-ref.rs +++ b/src/test/compile-fail/destructure-trait-ref.rs @@ -11,6 +11,8 @@ // The regression test for #15031 to make sure destructuring trait // reference work properly. +#![feature(box_syntax)] + trait T {} impl T for int {} diff --git a/src/test/compile-fail/feature-gate-box-expr.rs b/src/test/compile-fail/feature-gate-box-expr.rs new file mode 100644 index 0000000000000..bc7a70471cd8a --- /dev/null +++ b/src/test/compile-fail/feature-gate-box-expr.rs @@ -0,0 +1,23 @@ +// Copyright 2015 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + use std::boxed::HEAP; + + let x = box 'c'; //~ ERROR box expression syntax is experimental in alpha release + println!("x: {}", x); + + let x = box () 'c'; //~ ERROR box expression syntax is experimental in alpha release + println!("x: {}", x); + + let x = box (HEAP) 'c'; //~ ERROR box expression syntax is experimental in alpha release + println!("x: {}", x); +} + diff --git a/src/test/compile-fail/feature-gate-box-pat.rs b/src/test/compile-fail/feature-gate-box-pat.rs new file mode 100644 index 0000000000000..b36bc22b9dcce --- /dev/null +++ b/src/test/compile-fail/feature-gate-box-pat.rs @@ -0,0 +1,14 @@ +// Copyright 2015 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental in alpha release + println!("x: {}", x); +} diff --git a/src/test/compile-fail/issue-12116.rs b/src/test/compile-fail/issue-12116.rs index 47907ac2be9b8..8a5e8c27259da 100644 --- a/src/test/compile-fail/issue-12116.rs +++ b/src/test/compile-fail/issue-12116.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + enum IntList { Cons(int, Box), Nil diff --git a/src/test/compile-fail/issue-14084.rs b/src/test/compile-fail/issue-14084.rs index d247bf0913c3b..92e0dd3ad0e52 100644 --- a/src/test/compile-fail/issue-14084.rs +++ b/src/test/compile-fail/issue-14084.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + fn main() { box ( () ) 0; //~^ ERROR: only the managed heap and exchange heap are currently supported diff --git a/src/test/compile-fail/issue-3601.rs b/src/test/compile-fail/issue-3601.rs index f10305d017dc3..15b3ec0bfe708 100644 --- a/src/test/compile-fail/issue-3601.rs +++ b/src/test/compile-fail/issue-3601.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] struct HTMLImageData { image: Option diff --git a/src/test/compile-fail/issue-4972.rs b/src/test/compile-fail/issue-4972.rs index 765aec35fc6a8..b2b9dfce09217 100644 --- a/src/test/compile-fail/issue-4972.rs +++ b/src/test/compile-fail/issue-4972.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] trait MyTrait { } diff --git a/src/test/compile-fail/issue-5100.rs b/src/test/compile-fail/issue-5100.rs index df3748ac93468..ca7f87ff61ae3 100644 --- a/src/test/compile-fail/issue-5100.rs +++ b/src/test/compile-fail/issue-5100.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + enum A { B, C } fn main() { diff --git a/src/test/compile-fail/moves-based-on-type-block-bad.rs b/src/test/compile-fail/moves-based-on-type-block-bad.rs index 14af49dfc49c5..379397f22bd61 100644 --- a/src/test/compile-fail/moves-based-on-type-block-bad.rs +++ b/src/test/compile-fail/moves-based-on-type-block-bad.rs @@ -10,6 +10,8 @@ // ignore-tidy-linelength +#![feature(box_syntax)] + struct S { x: Box } diff --git a/src/test/compile-fail/regions-ref-in-fn-arg.rs b/src/test/compile-fail/regions-ref-in-fn-arg.rs index f9eecb60c6af1..e47fddbdc36fd 100644 --- a/src/test/compile-fail/regions-ref-in-fn-arg.rs +++ b/src/test/compile-fail/regions-ref-in-fn-arg.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] fn arg_item(box ref x: Box) -> &'static int { x //~^ ERROR borrowed value does not live long enough diff --git a/src/test/compile-fail/unreachable-arm.rs b/src/test/compile-fail/unreachable-arm.rs index 3ff6c733026b5..934ddb5f80bb1 100644 --- a/src/test/compile-fail/unreachable-arm.rs +++ b/src/test/compile-fail/unreachable-arm.rs @@ -10,6 +10,7 @@ // error-pattern:unreachable pattern +#![feature(box_syntax)] enum foo { a(Box, int), b(uint), } diff --git a/src/test/run-fail/args-panic.rs b/src/test/run-fail/args-panic.rs index 4878ec59fd4bc..eab7475bc8668 100644 --- a/src/test/run-fail/args-panic.rs +++ b/src/test/run-fail/args-panic.rs @@ -11,6 +11,9 @@ // error-pattern:meep +#![allow(unknown_features)] +#![feature(box_syntax)] + fn f(_a: int, _b: int, _c: Box) { panic!("moop"); } fn main() { f(1, panic!("meep"), box 42); } diff --git a/src/test/run-fail/panic-macro-any-wrapped.rs b/src/test/run-fail/panic-macro-any-wrapped.rs index e25390a798628..89e47bf46ab02 100644 --- a/src/test/run-fail/panic-macro-any-wrapped.rs +++ b/src/test/run-fail/panic-macro-any-wrapped.rs @@ -10,6 +10,9 @@ // error-pattern:panicked at 'Box' +#![allow(unknown_features)] +#![feature(box_syntax)] + fn main() { panic!(box 612_i64); } diff --git a/src/test/run-fail/panic-macro-any.rs b/src/test/run-fail/panic-macro-any.rs index b73c66c4f2165..231c57390b301 100644 --- a/src/test/run-fail/panic-macro-any.rs +++ b/src/test/run-fail/panic-macro-any.rs @@ -10,6 +10,9 @@ // error-pattern:panicked at 'Box' +#![allow(unknown_features)] +#![feature(box_syntax)] + fn main() { panic!(box 413i as Box<::std::any::Any+Send>); } diff --git a/src/test/run-fail/unique-panic.rs b/src/test/run-fail/unique-panic.rs index 07c9a21c5c110..9f643c09795df 100644 --- a/src/test/run-fail/unique-panic.rs +++ b/src/test/run-fail/unique-panic.rs @@ -9,4 +9,8 @@ // except according to those terms. // error-pattern: panic + +#![allow(unknown_features)] +#![feature(box_syntax)] + fn main() { box panic!(); } diff --git a/src/test/run-fail/unwind-unique.rs b/src/test/run-fail/unwind-unique.rs index 6b5aefbab802b..f39ded8f98e80 100644 --- a/src/test/run-fail/unwind-unique.rs +++ b/src/test/run-fail/unwind-unique.rs @@ -10,6 +10,8 @@ // error-pattern:fail +#![allow(unknown_features)] +#![feature(box_syntax)] fn failfn() { panic!(); diff --git a/src/test/run-pass/alignment-gep-tup-like-1.rs b/src/test/run-pass/alignment-gep-tup-like-1.rs index ecc1a6a495c11..72a79e188b3dc 100644 --- a/src/test/run-pass/alignment-gep-tup-like-1.rs +++ b/src/test/run-pass/alignment-gep-tup-like-1.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct pair { a: A, b: B } diff --git a/src/test/run-pass/assert-eq-macro-success.rs b/src/test/run-pass/assert-eq-macro-success.rs index 3da245efd79a8..089e1b8c5c2a3 100644 --- a/src/test/run-pass/assert-eq-macro-success.rs +++ b/src/test/run-pass/assert-eq-macro-success.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #[derive(PartialEq, Show)] struct Point { x : int } diff --git a/src/test/run-pass/associated-type-doubleendediterator-object.rs b/src/test/run-pass/associated-type-doubleendediterator-object.rs index 429027cbf304d..7365e052171ef 100644 --- a/src/test/run-pass/associated-type-doubleendediterator-object.rs +++ b/src/test/run-pass/associated-type-doubleendediterator-object.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn pairwise_sub(mut t: Box>) -> int { let mut result = 0; loop { diff --git a/src/test/run-pass/autoderef-method-on-trait.rs b/src/test/run-pass/autoderef-method-on-trait.rs index f13f598fda28c..876fc123f480c 100644 --- a/src/test/run-pass/autoderef-method-on-trait.rs +++ b/src/test/run-pass/autoderef-method-on-trait.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] trait double { fn double(self: Box) -> uint; diff --git a/src/test/run-pass/autoderef-method-priority.rs b/src/test/run-pass/autoderef-method-priority.rs index cc4dd13cf61c9..f5d5c81117e11 100644 --- a/src/test/run-pass/autoderef-method-priority.rs +++ b/src/test/run-pass/autoderef-method-priority.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] trait double { fn double(self) -> uint; diff --git a/src/test/run-pass/autoderef-method-twice-but-not-thrice.rs b/src/test/run-pass/autoderef-method-twice-but-not-thrice.rs index 856ee686db30e..282cf62190ce3 100644 --- a/src/test/run-pass/autoderef-method-twice-but-not-thrice.rs +++ b/src/test/run-pass/autoderef-method-twice-but-not-thrice.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] trait double { fn double(self: Box) -> uint; diff --git a/src/test/run-pass/autoderef-method-twice.rs b/src/test/run-pass/autoderef-method-twice.rs index 94da61483eaae..eb44e3b52b90f 100644 --- a/src/test/run-pass/autoderef-method-twice.rs +++ b/src/test/run-pass/autoderef-method-twice.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + trait double { fn double(self: Box) -> uint; } diff --git a/src/test/run-pass/autoderef-method.rs b/src/test/run-pass/autoderef-method.rs index 2e9751ce6acfc..4bbb17c6dd698 100644 --- a/src/test/run-pass/autoderef-method.rs +++ b/src/test/run-pass/autoderef-method.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + trait double { fn double(self: Box) -> uint; } diff --git a/src/test/run-pass/autoref-intermediate-types-issue-3585.rs b/src/test/run-pass/autoref-intermediate-types-issue-3585.rs index 7f44bcdb50c1a..e026ac9dcbaad 100644 --- a/src/test/run-pass/autoref-intermediate-types-issue-3585.rs +++ b/src/test/run-pass/autoref-intermediate-types-issue-3585.rs @@ -9,6 +9,9 @@ // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + trait Foo { fn foo(&self) -> String; } diff --git a/src/test/run-pass/bitv-perf-test.rs b/src/test/run-pass/bitv-perf-test.rs index c5f69f249db6b..325f6dec76f80 100644 --- a/src/test/run-pass/bitv-perf-test.rs +++ b/src/test/run-pass/bitv-perf-test.rs @@ -9,6 +9,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + extern crate collections; use std::collections::Bitv; diff --git a/src/test/run-pass/borrowck-borrow-from-expr-block.rs b/src/test/run-pass/borrowck-borrow-from-expr-block.rs index 038f9e5c9ab43..9fcd87418bee3 100644 --- a/src/test/run-pass/borrowck-borrow-from-expr-block.rs +++ b/src/test/run-pass/borrowck-borrow-from-expr-block.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] fn borrow(x: &int, f: F) where F: FnOnce(&int) { f(x) diff --git a/src/test/run-pass/borrowck-field-sensitivity.rs b/src/test/run-pass/borrowck-field-sensitivity.rs index 33be47e504be2..89d80190042c7 100644 --- a/src/test/run-pass/borrowck-field-sensitivity.rs +++ b/src/test/run-pass/borrowck-field-sensitivity.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct A { a: int, b: Box } struct B { a: Box, b: Box } diff --git a/src/test/run-pass/borrowck-macro-interaction-issue-6304.rs b/src/test/run-pass/borrowck-macro-interaction-issue-6304.rs index 28db3953a0021..49483e40096b3 100644 --- a/src/test/run-pass/borrowck-macro-interaction-issue-6304.rs +++ b/src/test/run-pass/borrowck-macro-interaction-issue-6304.rs @@ -11,6 +11,7 @@ // Check that we do not ICE when compiling this // macro, which reuses the expression `$id` +#![feature(box_syntax)] struct Foo { a: int diff --git a/src/test/run-pass/borrowck-move-by-capture-ok.rs b/src/test/run-pass/borrowck-move-by-capture-ok.rs index a6b142bb12654..773780ffb0953 100644 --- a/src/test/run-pass/borrowck-move-by-capture-ok.rs +++ b/src/test/run-pass/borrowck-move-by-capture-ok.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] pub fn main() { diff --git a/src/test/run-pass/borrowck-mut-uniq.rs b/src/test/run-pass/borrowck-mut-uniq.rs index c586ff2c93ab3..4416c57e3456e 100644 --- a/src/test/run-pass/borrowck-mut-uniq.rs +++ b/src/test/run-pass/borrowck-mut-uniq.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::mem::swap; #[derive(Show)] diff --git a/src/test/run-pass/borrowck-use-mut-borrow.rs b/src/test/run-pass/borrowck-use-mut-borrow.rs index cbfdd5961ffac..7be12ff3cc965 100644 --- a/src/test/run-pass/borrowck-use-mut-borrow.rs +++ b/src/test/run-pass/borrowck-use-mut-borrow.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct A { a: int, b: Box } fn field_copy_after_field_borrow() { diff --git a/src/test/run-pass/cancel-clean-via-immediate-rvalue-ref.rs b/src/test/run-pass/cancel-clean-via-immediate-rvalue-ref.rs index d326c20707d9f..631133cc7ff8b 100644 --- a/src/test/run-pass/cancel-clean-via-immediate-rvalue-ref.rs +++ b/src/test/run-pass/cancel-clean-via-immediate-rvalue-ref.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] fn foo(x: &mut Box) { *x = box 5; diff --git a/src/test/run-pass/capturing-logging.rs b/src/test/run-pass/capturing-logging.rs index e3e0041050762..00673bee8b47f 100644 --- a/src/test/run-pass/capturing-logging.rs +++ b/src/test/run-pass/capturing-logging.rs @@ -11,6 +11,9 @@ // ignore-android (FIXME #11419) // exec-env:RUST_LOG=info +#![allow(unknown_features)] +#![feature(box_syntax)] + #[macro_use] extern crate log; diff --git a/src/test/run-pass/cci_borrow.rs b/src/test/run-pass/cci_borrow.rs index 262c19174b18b..ef5ee5aa3b4ab 100644 --- a/src/test/run-pass/cci_borrow.rs +++ b/src/test/run-pass/cci_borrow.rs @@ -10,6 +10,8 @@ // aux-build:cci_borrow_lib.rs +#![allow(unknown_features)] +#![feature(box_syntax)] extern crate cci_borrow_lib; use cci_borrow_lib::foo; diff --git a/src/test/run-pass/class-cast-to-trait-cross-crate-2.rs b/src/test/run-pass/class-cast-to-trait-cross-crate-2.rs index a041bbfe8ad92..e6cae99067e05 100644 --- a/src/test/run-pass/class-cast-to-trait-cross-crate-2.rs +++ b/src/test/run-pass/class-cast-to-trait-cross-crate-2.rs @@ -9,6 +9,10 @@ // except according to those terms. // aux-build:cci_class_cast.rs + +#![allow(unknown_features)] +#![feature(box_syntax)] + extern crate cci_class_cast; use std::string::ToString; diff --git a/src/test/run-pass/class-separate-impl.rs b/src/test/run-pass/class-separate-impl.rs index 9c7913dc0b0b1..c2fa98a66df95 100644 --- a/src/test/run-pass/class-separate-impl.rs +++ b/src/test/run-pass/class-separate-impl.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::fmt; struct cat { diff --git a/src/test/run-pass/cleanup-arm-conditional.rs b/src/test/run-pass/cleanup-arm-conditional.rs index 65ad68ba702f4..0d155ae085c73 100644 --- a/src/test/run-pass/cleanup-arm-conditional.rs +++ b/src/test/run-pass/cleanup-arm-conditional.rs @@ -21,6 +21,9 @@ // Test that cleanup scope for temporaries created in a match // arm is confined to the match arm itself. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::os; struct Test { x: int } diff --git a/src/test/run-pass/cleanup-rvalue-during-if-and-while.rs b/src/test/run-pass/cleanup-rvalue-during-if-and-while.rs index 89b0010208132..83f93cb81a1e6 100644 --- a/src/test/run-pass/cleanup-rvalue-during-if-and-while.rs +++ b/src/test/run-pass/cleanup-rvalue-during-if-and-while.rs @@ -12,6 +12,8 @@ // This test verifies that temporaries created for `while`'s and `if` // conditions are dropped after the condition is evaluated. +#![allow(unknown_features)] +#![feature(box_syntax)] struct Temporary; diff --git a/src/test/run-pass/cleanup-rvalue-scopes.rs b/src/test/run-pass/cleanup-rvalue-scopes.rs index 59763e417a258..bbfe0e6a18dbc 100644 --- a/src/test/run-pass/cleanup-rvalue-scopes.rs +++ b/src/test/run-pass/cleanup-rvalue-scopes.rs @@ -12,6 +12,8 @@ // statement or end of block, as appropriate given the temporary // lifetime rules. +#![feature(box_syntax)] + use std::ops::Drop; static mut FLAGS: u64 = 0; diff --git a/src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs b/src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs index 526819940d003..04ab0d881a84d 100644 --- a/src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs +++ b/src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs @@ -24,6 +24,9 @@ // It's unclear how likely such a bug is to recur, but it seems like a // scenario worth testing. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::thread::Thread; enum Conzabble { diff --git a/src/test/run-pass/clone-with-exterior.rs b/src/test/run-pass/clone-with-exterior.rs index cb495859708b6..8eeae7a28ac85 100644 --- a/src/test/run-pass/clone-with-exterior.rs +++ b/src/test/run-pass/clone-with-exterior.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::thread::Thread; struct Pair { diff --git a/src/test/run-pass/close-over-big-then-small-data.rs b/src/test/run-pass/close-over-big-then-small-data.rs index 375767c8f5157..99fdc34602617 100644 --- a/src/test/run-pass/close-over-big-then-small-data.rs +++ b/src/test/run-pass/close-over-big-then-small-data.rs @@ -12,6 +12,9 @@ // storing closure data (as we used to do), the u64 would // overwrite the u16. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct Pair { a: A, b: B } diff --git a/src/test/run-pass/coerce-expect-unsized.rs b/src/test/run-pass/coerce-expect-unsized.rs index 09f230792a9b7..3964d54f8609c 100644 --- a/src/test/run-pass/coerce-expect-unsized.rs +++ b/src/test/run-pass/coerce-expect-unsized.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::fmt::Show; // Check that coercions apply at the pointer level and don't cause diff --git a/src/test/run-pass/coerce-match-calls.rs b/src/test/run-pass/coerce-match-calls.rs new file mode 100644 index 0000000000000..0ff28b471a30d --- /dev/null +++ b/src/test/run-pass/coerce-match-calls.rs @@ -0,0 +1,23 @@ +// 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Check that coercions are propagated through match and if expressions. + +use std::boxed::Box; + +pub fn main() { + let _: Box<[int]> = if true { Box::new([1i, 2, 3]) } else { Box::new([1i]) }; + + let _: Box<[int]> = match true { true => Box::new([1i, 2, 3]), false => Box::new([1i]) }; + + // Check we don't get over-keen at propagating coercions in the case of casts. + let x = if true { 42 } else { 42u8 } as u16; + let x = match true { true => 42, false => 42u8 } as u16; +} diff --git a/src/test/run-pass/coerce-match.rs b/src/test/run-pass/coerce-match.rs index d67664bb1be47..0992ee97d061f 100644 --- a/src/test/run-pass/coerce-match.rs +++ b/src/test/run-pass/coerce-match.rs @@ -10,6 +10,9 @@ // Check that coercions are propagated through match and if expressions. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let _: Box<[int]> = if true { box [1i, 2, 3] } else { box [1i] }; diff --git a/src/test/run-pass/const-bound.rs b/src/test/run-pass/const-bound.rs index e24bc1dbff9d5..3a6973fe61c77 100644 --- a/src/test/run-pass/const-bound.rs +++ b/src/test/run-pass/const-bound.rs @@ -11,6 +11,8 @@ // Make sure const bounds work on things, and test that a few types // are const. +#![allow(unknown_features)] +#![feature(box_syntax)] fn foo(x: T) -> T { x } diff --git a/src/test/run-pass/crate-method-reexport-grrrrrrr.rs b/src/test/run-pass/crate-method-reexport-grrrrrrr.rs index 0088a36eda9a3..1a3e87b55b64b 100644 --- a/src/test/run-pass/crate-method-reexport-grrrrrrr.rs +++ b/src/test/run-pass/crate-method-reexport-grrrrrrr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] // This is a regression test that the metadata for the // name_pool::methods impl in the other crate is reachable from this diff --git a/src/test/run-pass/deref-lval.rs b/src/test/run-pass/deref-lval.rs index d9b0940f80b3f..ead0683b87090 100644 --- a/src/test/run-pass/deref-lval.rs +++ b/src/test/run-pass/deref-lval.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] use std::cell::Cell; diff --git a/src/test/run-pass/deref.rs b/src/test/run-pass/deref.rs index 117b133a11319..b4ee0246d8780 100644 --- a/src/test/run-pass/deref.rs +++ b/src/test/run-pass/deref.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] pub fn main() { let x: Box = box 10; diff --git a/src/test/run-pass/deriving-default-box.rs b/src/test/run-pass/deriving-default-box.rs index aea6ebd25975c..b00ceb6ed22c7 100644 --- a/src/test/run-pass/deriving-default-box.rs +++ b/src/test/run-pass/deriving-default-box.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::default::Default; #[derive(Default)] diff --git a/src/test/run-pass/deriving-encodable-decodable-box.rs b/src/test/run-pass/deriving-encodable-decodable-box.rs index b7be14321fde6..1a204fa3e206e 100644 --- a/src/test/run-pass/deriving-encodable-decodable-box.rs +++ b/src/test/run-pass/deriving-encodable-decodable-box.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(old_orphan_check)] extern crate serialize; diff --git a/src/test/run-pass/deriving-eq-ord-boxed-slice.rs b/src/test/run-pass/deriving-eq-ord-boxed-slice.rs index 6701a32133938..3b89c943edb1c 100644 --- a/src/test/run-pass/deriving-eq-ord-boxed-slice.rs +++ b/src/test/run-pass/deriving-eq-ord-boxed-slice.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + #[derive(PartialEq, PartialOrd, Eq, Ord)] struct Foo(Box<[u8]>); diff --git a/src/test/run-pass/drop-on-empty-block-exit.rs b/src/test/run-pass/drop-on-empty-block-exit.rs index e3927bd536773..f875d0644a07d 100644 --- a/src/test/run-pass/drop-on-empty-block-exit.rs +++ b/src/test/run-pass/drop-on-empty-block-exit.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] enum t { foo(Box), } diff --git a/src/test/run-pass/drop-struct-as-object.rs b/src/test/run-pass/drop-struct-as-object.rs index 6d7715ed9a5a0..7a3b6df539f14 100644 --- a/src/test/run-pass/drop-struct-as-object.rs +++ b/src/test/run-pass/drop-struct-as-object.rs @@ -11,6 +11,9 @@ // Test that destructor on a struct runs successfully after the struct // is boxed and converted to an object. +#![allow(unknown_features)] +#![feature(box_syntax)] + static mut value: uint = 0; struct Cat { diff --git a/src/test/run-pass/drop-trait-enum.rs b/src/test/run-pass/drop-trait-enum.rs index c024b6ce86171..9bfb3572ab562 100644 --- a/src/test/run-pass/drop-trait-enum.rs +++ b/src/test/run-pass/drop-trait-enum.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::thread::Thread; use std::sync::mpsc::{channel, Sender}; diff --git a/src/test/run-pass/dst-deref-mut.rs b/src/test/run-pass/dst-deref-mut.rs index 0a12df53de232..909f7f4897a6a 100644 --- a/src/test/run-pass/dst-deref-mut.rs +++ b/src/test/run-pass/dst-deref-mut.rs @@ -10,6 +10,9 @@ // Test that a custom deref with a fat pointer return type does not ICE +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::ops::{Deref, DerefMut}; pub struct Arr { diff --git a/src/test/run-pass/dst-deref.rs b/src/test/run-pass/dst-deref.rs index 8ef8f1a868d51..ad4456b5b592d 100644 --- a/src/test/run-pass/dst-deref.rs +++ b/src/test/run-pass/dst-deref.rs @@ -10,6 +10,9 @@ // Test that a custom deref with a fat pointer return type does not ICE +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::ops::Deref; pub struct Arr { diff --git a/src/test/run-pass/dst-struct.rs b/src/test/run-pass/dst-struct.rs index 9c0e5a6f5c899..b2092e745a116 100644 --- a/src/test/run-pass/dst-struct.rs +++ b/src/test/run-pass/dst-struct.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct Fat { f1: int, f2: &'static str, diff --git a/src/test/run-pass/dst-trait.rs b/src/test/run-pass/dst-trait.rs index 0b50609fddfef..627d197879d26 100644 --- a/src/test/run-pass/dst-trait.rs +++ b/src/test/run-pass/dst-trait.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct Fat { f1: int, f2: &'static str, diff --git a/src/test/run-pass/empty-allocation-non-null.rs b/src/test/run-pass/empty-allocation-non-null.rs index 56eb340ef59ac..269e0ee6ce425 100644 --- a/src/test/run-pass/empty-allocation-non-null.rs +++ b/src/test/run-pass/empty-allocation-non-null.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { assert!(Some(box() ()).is_some()); diff --git a/src/test/run-pass/empty-allocation-rvalue-non-null.rs b/src/test/run-pass/empty-allocation-rvalue-non-null.rs index 96c5f81558e39..e95d58c706b27 100644 --- a/src/test/run-pass/empty-allocation-rvalue-non-null.rs +++ b/src/test/run-pass/empty-allocation-rvalue-non-null.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let x = *box() (); } diff --git a/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs b/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs index 7d856fd5656c7..817136572024b 100644 --- a/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs +++ b/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] /*! * This is a regression test for a bug in LLVM, fixed in upstream r179587, diff --git a/src/test/run-pass/explicit-self-generic.rs b/src/test/run-pass/explicit-self-generic.rs index 87f1adba8ddcf..a2aaaa235e429 100644 --- a/src/test/run-pass/explicit-self-generic.rs +++ b/src/test/run-pass/explicit-self-generic.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct LM { resize_at: uint, size: uint } impl Copy for LM {} diff --git a/src/test/run-pass/explicit-self-objects-uniq.rs b/src/test/run-pass/explicit-self-objects-uniq.rs index e566f218aa8f6..501ba01b4ce1c 100644 --- a/src/test/run-pass/explicit-self-objects-uniq.rs +++ b/src/test/run-pass/explicit-self-objects-uniq.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] trait Foo { fn f(self: Box); diff --git a/src/test/run-pass/explicit-self.rs b/src/test/run-pass/explicit-self.rs index 8a67e40844a73..e5d8ec3f8ad0d 100644 --- a/src/test/run-pass/explicit-self.rs +++ b/src/test/run-pass/explicit-self.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + static tau: f64 = 2.0*3.14159265358979323; struct Point {x: f64, y: f64} diff --git a/src/test/run-pass/expr-block-generic-unique1.rs b/src/test/run-pass/expr-block-generic-unique1.rs index 5c1039fe43368..1654c87c6a484 100644 --- a/src/test/run-pass/expr-block-generic-unique1.rs +++ b/src/test/run-pass/expr-block-generic-unique1.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn test_generic(expected: Box, eq: F) where T: Clone, F: FnOnce(Box, Box) -> bool { let actual: Box = { expected.clone() }; assert!(eq(expected, actual)); diff --git a/src/test/run-pass/expr-block-generic-unique2.rs b/src/test/run-pass/expr-block-generic-unique2.rs index 3d736cca6d524..e41ce37cc3a1d 100644 --- a/src/test/run-pass/expr-block-generic-unique2.rs +++ b/src/test/run-pass/expr-block-generic-unique2.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn test_generic(expected: T, eq: F) where T: Clone, F: FnOnce(T, T) -> bool { let actual: T = { expected.clone() }; assert!(eq(expected, actual)); diff --git a/src/test/run-pass/expr-block-unique.rs b/src/test/run-pass/expr-block-unique.rs index 0dff989002f5b..d934ce677d121 100644 --- a/src/test/run-pass/expr-block-unique.rs +++ b/src/test/run-pass/expr-block-unique.rs @@ -9,6 +9,7 @@ // except according to those terms. - +#![allow(unknown_features)] +#![feature(box_syntax)] pub fn main() { let x = { box 100i }; assert!((*x == 100)); } diff --git a/src/test/run-pass/expr-if-unique.rs b/src/test/run-pass/expr-if-unique.rs index b1fdf51d9b133..5294d05401c89 100644 --- a/src/test/run-pass/expr-if-unique.rs +++ b/src/test/run-pass/expr-if-unique.rs @@ -9,7 +9,8 @@ // except according to those terms. - +#![allow(unknown_features)] +#![feature(box_syntax)] // Tests for if as expressions returning boxed types diff --git a/src/test/run-pass/expr-match-generic-unique1.rs b/src/test/run-pass/expr-match-generic-unique1.rs index 5fc9a502ca8a0..9de1379f480f1 100644 --- a/src/test/run-pass/expr-match-generic-unique1.rs +++ b/src/test/run-pass/expr-match-generic-unique1.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn test_generic(expected: Box, eq: F) where F: FnOnce(Box, Box) -> bool { let actual: Box = match true { true => { expected.clone() }, diff --git a/src/test/run-pass/expr-match-generic-unique2.rs b/src/test/run-pass/expr-match-generic-unique2.rs index e608f9c46c79c..489cd8437d21f 100644 --- a/src/test/run-pass/expr-match-generic-unique2.rs +++ b/src/test/run-pass/expr-match-generic-unique2.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn test_generic(expected: T, eq: F) where F: FnOnce(T, T) -> bool { let actual: T = match true { true => expected.clone(), diff --git a/src/test/run-pass/expr-match-unique.rs b/src/test/run-pass/expr-match-unique.rs index 83f2ada02b0ff..7958f4927daf8 100644 --- a/src/test/run-pass/expr-match-unique.rs +++ b/src/test/run-pass/expr-match-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] // Tests for match as expressions resulting in boxed types fn test_box() { diff --git a/src/test/run-pass/fsu-moves-and-copies.rs b/src/test/run-pass/fsu-moves-and-copies.rs index a08cd33362f47..0f8d7c24360fb 100644 --- a/src/test/run-pass/fsu-moves-and-copies.rs +++ b/src/test/run-pass/fsu-moves-and-copies.rs @@ -11,6 +11,9 @@ // Issue 4691: Ensure that functional-struct-updates operates // correctly and moves rather than copy when appropriate. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::marker::NoCopy as NP; struct ncint { np: NP, v: int } diff --git a/src/test/run-pass/func-arg-incomplete-pattern.rs b/src/test/run-pass/func-arg-incomplete-pattern.rs index 6d06c12c4507e..b23d8db3cfdd5 100644 --- a/src/test/run-pass/func-arg-incomplete-pattern.rs +++ b/src/test/run-pass/func-arg-incomplete-pattern.rs @@ -11,6 +11,8 @@ // Test that we do not leak when the arg pattern must drop part of the // argument (in this case, the `y` field). +#![allow(unknown_features)] +#![feature(box_syntax)] struct Foo { x: Box, diff --git a/src/test/run-pass/func-arg-ref-pattern.rs b/src/test/run-pass/func-arg-ref-pattern.rs index 5eeace6505400..9e94bca96f7bd 100644 --- a/src/test/run-pass/func-arg-ref-pattern.rs +++ b/src/test/run-pass/func-arg-ref-pattern.rs @@ -14,6 +14,8 @@ // boxes. Make sure that we don't free the box as we match the // pattern. +#![allow(unknown_features)] +#![feature(box_syntax)] fn getaddr(box ref x: Box) -> *const uint { let addr: *const uint = &*x; diff --git a/src/test/run-pass/generic-alias-unique.rs b/src/test/run-pass/generic-alias-unique.rs index 8b5dfb6cf75a0..34b7f15e4c6b1 100644 --- a/src/test/run-pass/generic-alias-unique.rs +++ b/src/test/run-pass/generic-alias-unique.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn id(t: T) -> T { return t; } pub fn main() { diff --git a/src/test/run-pass/generic-exterior-unique.rs b/src/test/run-pass/generic-exterior-unique.rs index 0746c994c2a6b..a2f7bdfd81709 100644 --- a/src/test/run-pass/generic-exterior-unique.rs +++ b/src/test/run-pass/generic-exterior-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] struct Recbox {x: Box} diff --git a/src/test/run-pass/generic-fn-unique.rs b/src/test/run-pass/generic-fn-unique.rs index e1a8ad7c20ab0..be83cb04f2c37 100644 --- a/src/test/run-pass/generic-fn-unique.rs +++ b/src/test/run-pass/generic-fn-unique.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn f(x: Box) -> Box { return x; } pub fn main() { let x = f(box 3i); println!("{}", *x); } diff --git a/src/test/run-pass/generic-object.rs b/src/test/run-pass/generic-object.rs index d0a5af8e2cecf..986b35cbecf96 100644 --- a/src/test/run-pass/generic-object.rs +++ b/src/test/run-pass/generic-object.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] trait Foo { fn get(&self) -> T; diff --git a/src/test/run-pass/generic-recursive-tag.rs b/src/test/run-pass/generic-recursive-tag.rs index b738b5271220a..845375d9b840a 100644 --- a/src/test/run-pass/generic-recursive-tag.rs +++ b/src/test/run-pass/generic-recursive-tag.rs @@ -10,6 +10,8 @@ // ignore-pretty FIXME(#14193) +#![allow(unknown_features)] +#![feature(box_syntax)] enum list { cons(Box, Box>), nil, } diff --git a/src/test/run-pass/generic-tag.rs b/src/test/run-pass/generic-tag.rs index 250c5bb66af47..b0d4944ba540b 100644 --- a/src/test/run-pass/generic-tag.rs +++ b/src/test/run-pass/generic-tag.rs @@ -10,6 +10,8 @@ #![allow(dead_assignment)] #![allow(unused_variable)] +#![allow(unknown_features)] +#![feature(box_syntax)] enum option { some(Box), none, } diff --git a/src/test/run-pass/generic-unique.rs b/src/test/run-pass/generic-unique.rs index 4821b9354bfda..1d39c47417c10 100644 --- a/src/test/run-pass/generic-unique.rs +++ b/src/test/run-pass/generic-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] struct Triple { x: T, y: T, z: T } diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs index f83698edc9052..0e82ad437829f 100644 --- a/src/test/run-pass/hashmap-memory.rs +++ b/src/test/run-pass/hashmap-memory.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] /** diff --git a/src/test/run-pass/hrtb-precedence-of-plus.rs b/src/test/run-pass/hrtb-precedence-of-plus.rs index 9a43b5b711eb5..1d1e744ef0802 100644 --- a/src/test/run-pass/hrtb-precedence-of-plus.rs +++ b/src/test/run-pass/hrtb-precedence-of-plus.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] // Test that `Fn(int) -> int + 'static` parses as `(Fn(int) -> int) + diff --git a/src/test/run-pass/ifmt.rs b/src/test/run-pass/ifmt.rs index c8d1080372b50..dbc23a63bbadf 100644 --- a/src/test/run-pass/ifmt.rs +++ b/src/test/run-pass/ifmt.rs @@ -13,6 +13,8 @@ #![deny(warnings)] #![allow(unused_must_use)] +#![allow(unknown_features)] +#![feature(box_syntax)] use std::fmt; diff --git a/src/test/run-pass/init-res-into-things.rs b/src/test/run-pass/init-res-into-things.rs index ee82a99a8084b..eeae3f35cfcd0 100644 --- a/src/test/run-pass/init-res-into-things.rs +++ b/src/test/run-pass/init-res-into-things.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unsafe_destructor)] use std::cell::Cell; diff --git a/src/test/run-pass/intrinsic-atomics.rs b/src/test/run-pass/intrinsic-atomics.rs index 3b81943000bf8..0644fbbc99f41 100644 --- a/src/test/run-pass/intrinsic-atomics.rs +++ b/src/test/run-pass/intrinsic-atomics.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(intrinsics)] mod rusti { diff --git a/src/test/run-pass/intrinsic-move-val.rs b/src/test/run-pass/intrinsic-move-val.rs index f1bbf353f717d..fb04f67e380ab 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. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(intrinsics)] use std::mem::transmute; diff --git a/src/test/run-pass/issue-10682.rs b/src/test/run-pass/issue-10682.rs index fd0ad1ef47ecb..883e52b61d081 100644 --- a/src/test/run-pass/issue-10682.rs +++ b/src/test/run-pass/issue-10682.rs @@ -11,6 +11,9 @@ // Regression test for issue #10682 // Nested `proc` usage can't use outer owned data +#![allow(unknown_features)] +#![feature(box_syntax)] + fn work(_: Box) {} fn foo(_: F) {} diff --git a/src/test/run-pass/issue-10767.rs b/src/test/run-pass/issue-10767.rs index d28950241874d..c717053cffc74 100644 --- a/src/test/run-pass/issue-10767.rs +++ b/src/test/run-pass/issue-10767.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] pub fn main() { fn f() { diff --git a/src/test/run-pass/issue-10802.rs b/src/test/run-pass/issue-10802.rs index ab080834ac94b..de2b4c51e52a9 100644 --- a/src/test/run-pass/issue-10802.rs +++ b/src/test/run-pass/issue-10802.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct DroppableStruct; enum DroppableEnum { DroppableVariant1, DroppableVariant2 diff --git a/src/test/run-pass/issue-11205.rs b/src/test/run-pass/issue-11205.rs index 549a70f19e334..194208620a8ea 100644 --- a/src/test/run-pass/issue-11205.rs +++ b/src/test/run-pass/issue-11205.rs @@ -9,6 +9,8 @@ // except according to those terms. #![allow(dead_code)] +#![allow(unknown_features)] +#![feature(box_syntax)] trait Foo {} impl Foo for int {} diff --git a/src/test/run-pass/issue-11552.rs b/src/test/run-pass/issue-11552.rs index 92862961acaba..f47f1e06011d9 100644 --- a/src/test/run-pass/issue-11552.rs +++ b/src/test/run-pass/issue-11552.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #[derive(Clone)] enum Noun diff --git a/src/test/run-pass/issue-11677.rs b/src/test/run-pass/issue-11677.rs index 14c1b1b06eabf..6fa4505869478 100644 --- a/src/test/run-pass/issue-11677.rs +++ b/src/test/run-pass/issue-11677.rs @@ -9,6 +9,8 @@ // except according to those terms. #![allow(dead_code)] +#![allow(unknown_features)] +#![feature(box_syntax)] // this code used to cause an ICE diff --git a/src/test/run-pass/issue-12744.rs b/src/test/run-pass/issue-12744.rs index a91dbd2b716b6..ec929a9c792de 100644 --- a/src/test/run-pass/issue-12744.rs +++ b/src/test/run-pass/issue-12744.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn main() { fn test() -> Box { box 1i } println!("{:?}", test()) diff --git a/src/test/run-pass/issue-13323.rs b/src/test/run-pass/issue-13323.rs index b7cd8a9011276..75d3c6f334d07 100644 --- a/src/test/run-pass/issue-13323.rs +++ b/src/test/run-pass/issue-13323.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct StrWrap { s: String } diff --git a/src/test/run-pass/issue-13808.rs b/src/test/run-pass/issue-13808.rs index c0652b946dbe5..3c5ece87b737d 100644 --- a/src/test/run-pass/issue-13808.rs +++ b/src/test/run-pass/issue-13808.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct Foo<'a> { listener: Box, } diff --git a/src/test/run-pass/issue-14399.rs b/src/test/run-pass/issue-14399.rs index bb0fe6a87ab07..7e533c2cf86c1 100644 --- a/src/test/run-pass/issue-14399.rs +++ b/src/test/run-pass/issue-14399.rs @@ -13,6 +13,9 @@ // value was coerced to a trait object. (v.clone() returns Box // which is coerced to Box). +#![allow(unknown_features)] +#![feature(box_syntax)] + #[derive(Clone)] struct B1; diff --git a/src/test/run-pass/issue-14589.rs b/src/test/run-pass/issue-14589.rs index afc2fc6cf647f..d9763baa82657 100644 --- a/src/test/run-pass/issue-14589.rs +++ b/src/test/run-pass/issue-14589.rs @@ -11,6 +11,9 @@ // All 3 expressions should work in that the argument gets // coerced to a trait object +#![allow(unknown_features)] +#![feature(box_syntax)] + fn main() { send::>(box Output(0)); Test::>::foo(box Output(0)); diff --git a/src/test/run-pass/issue-14919.rs b/src/test/run-pass/issue-14919.rs index 21bda93ecec65..4d05b98147bd6 100644 --- a/src/test/run-pass/issue-14919.rs +++ b/src/test/run-pass/issue-14919.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + trait Matcher { fn next_match(&mut self) -> Option<(uint, uint)>; } diff --git a/src/test/run-pass/issue-15571.rs b/src/test/run-pass/issue-15571.rs index 03d18cf8c9815..6b273b5786a93 100644 --- a/src/test/run-pass/issue-15571.rs +++ b/src/test/run-pass/issue-15571.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn match_on_local() { let mut foo = Some(box 5i); match foo { diff --git a/src/test/run-pass/issue-15763.rs b/src/test/run-pass/issue-15763.rs index 48fdcb09080ae..283ea25b6fe17 100644 --- a/src/test/run-pass/issue-15763.rs +++ b/src/test/run-pass/issue-15763.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #[derive(PartialEq, Show)] struct Bar { diff --git a/src/test/run-pass/issue-16668.rs b/src/test/run-pass/issue-16668.rs index 1febf33742974..75b1e11ddc1e6 100644 --- a/src/test/run-pass/issue-16668.rs +++ b/src/test/run-pass/issue-16668.rs @@ -10,6 +10,8 @@ // ignore-pretty +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] struct Parser<'a, I, O> { diff --git a/src/test/run-pass/issue-16739.rs b/src/test/run-pass/issue-16739.rs index 552ce565f6b17..cb6f068cf45b8 100644 --- a/src/test/run-pass/issue-16739.rs +++ b/src/test/run-pass/issue-16739.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] // Test that unboxing shim for calling rust-call ABI methods through a diff --git a/src/test/run-pass/issue-16774.rs b/src/test/run-pass/issue-16774.rs index 4246fced26c66..175e218881138 100644 --- a/src/test/run-pass/issue-16774.rs +++ b/src/test/run-pass/issue-16774.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] use std::ops::{Deref, DerefMut}; diff --git a/src/test/run-pass/issue-17322.rs b/src/test/run-pass/issue-17322.rs index c5784154a2ece..b50bf442b5d60 100644 --- a/src/test/run-pass/issue-17322.rs +++ b/src/test/run-pass/issue-17322.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::io; fn f(wr: &mut Writer) { diff --git a/src/test/run-pass/issue-17734.rs b/src/test/run-pass/issue-17734.rs index f68ab01ea9b54..e58fbe0b4c283 100644 --- a/src/test/run-pass/issue-17734.rs +++ b/src/test/run-pass/issue-17734.rs @@ -10,6 +10,9 @@ // Test that generating drop glue for Box doesn't ICE +#![allow(unknown_features)] +#![feature(box_syntax)] + fn f(s: Box) -> Box { s } diff --git a/src/test/run-pass/issue-18425.rs b/src/test/run-pass/issue-18425.rs index f61530c741851..6d223923ac1df 100644 --- a/src/test/run-pass/issue-18425.rs +++ b/src/test/run-pass/issue-18425.rs @@ -11,6 +11,9 @@ // Check that trans doesn't ICE when translating an array repeat // expression with a count of 1 and a non-Copy element type. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn main() { let _ = [box 1u; 1]; } diff --git a/src/test/run-pass/issue-2288.rs b/src/test/run-pass/issue-2288.rs index 1f371f0a1c204..7baead6929beb 100644 --- a/src/test/run-pass/issue-2288.rs +++ b/src/test/run-pass/issue-2288.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] trait clam { fn chowder(&self, y: A); diff --git a/src/test/run-pass/issue-2633-2.rs b/src/test/run-pass/issue-2633-2.rs index e2a03c696f2f2..c146f8a7a9afb 100644 --- a/src/test/run-pass/issue-2633-2.rs +++ b/src/test/run-pass/issue-2633-2.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn a_val(x: Box, y: Box) -> int { *x + *y diff --git a/src/test/run-pass/issue-2708.rs b/src/test/run-pass/issue-2708.rs index 3ac4b874f3ad8..1f072af0f5a64 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. +#![allow(unknown_features)] +#![feature(box_syntax)] struct Font { fontbuf: uint, diff --git a/src/test/run-pass/issue-2718.rs b/src/test/run-pass/issue-2718.rs index 3ca3e0592e789..6f5f46edc01cb 100644 --- a/src/test/run-pass/issue-2718.rs +++ b/src/test/run-pass/issue-2718.rs @@ -11,6 +11,8 @@ // // ignore-lexer-test FIXME #15883 +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unsafe_destructor)] pub type Task = int; diff --git a/src/test/run-pass/issue-2734.rs b/src/test/run-pass/issue-2734.rs index 9eec2d048d473..3e4cffe5dfa38 100644 --- a/src/test/run-pass/issue-2734.rs +++ b/src/test/run-pass/issue-2734.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] trait hax { } impl hax for A { } diff --git a/src/test/run-pass/issue-2735.rs b/src/test/run-pass/issue-2735.rs index 74b64bb87cfc5..cb376d0e4398d 100644 --- a/src/test/run-pass/issue-2735.rs +++ b/src/test/run-pass/issue-2735.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] trait hax { } impl hax for A { } diff --git a/src/test/run-pass/issue-2935.rs b/src/test/run-pass/issue-2935.rs index cdc41e892f964..295fd538de635 100644 --- a/src/test/run-pass/issue-2935.rs +++ b/src/test/run-pass/issue-2935.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] //type t = { a: int }; // type t = { a: bool }; diff --git a/src/test/run-pass/issue-3012-2.rs b/src/test/run-pass/issue-3012-2.rs index aa2ce824822b1..de2d4374d787f 100644 --- a/src/test/run-pass/issue-3012-2.rs +++ b/src/test/run-pass/issue-3012-2.rs @@ -10,6 +10,8 @@ // aux-build:issue-3012-1.rs +#![allow(unknown_features)] +#![feature(box_syntax)] extern crate socketlib; extern crate libc; diff --git a/src/test/run-pass/issue-3026.rs b/src/test/run-pass/issue-3026.rs index b30c0a117a805..cd71bfce27428 100644 --- a/src/test/run-pass/issue-3026.rs +++ b/src/test/run-pass/issue-3026.rs @@ -9,6 +9,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + extern crate collections; use std::collections::HashMap; diff --git a/src/test/run-pass/issue-3052.rs b/src/test/run-pass/issue-3052.rs index 72cf2219bb6f0..c08bdf5440812 100644 --- a/src/test/run-pass/issue-3052.rs +++ b/src/test/run-pass/issue-3052.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] type Connection = Box) + 'static>; diff --git a/src/test/run-pass/issue-3121.rs b/src/test/run-pass/issue-3121.rs index 9e9d611f1a320..c789921f6220a 100644 --- a/src/test/run-pass/issue-3121.rs +++ b/src/test/run-pass/issue-3121.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] enum side { mayo, catsup, vinegar } enum order { hamburger, fries(side), shake } diff --git a/src/test/run-pass/issue-3290.rs b/src/test/run-pass/issue-3290.rs index 139d984b50733..a72b272abaac6 100644 --- a/src/test/run-pass/issue-3290.rs +++ b/src/test/run-pass/issue-3290.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let mut x = box 3i; x = x; diff --git a/src/test/run-pass/issue-3424.rs b/src/test/run-pass/issue-3424.rs index 528870d033476..6647fbe2238ef 100644 --- a/src/test/run-pass/issue-3424.rs +++ b/src/test/run-pass/issue-3424.rs @@ -11,6 +11,8 @@ // rustc --test ignores2.rs && ./ignores2 +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] use std::path::{Path}; diff --git a/src/test/run-pass/issue-3447.rs b/src/test/run-pass/issue-3447.rs index 4ebf981e4ee55..12c2155dd57a7 100644 --- a/src/test/run-pass/issue-3447.rs +++ b/src/test/run-pass/issue-3447.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] use std::cell::RefCell; diff --git a/src/test/run-pass/issue-3609.rs b/src/test/run-pass/issue-3609.rs index c3cfaf22dee05..56eb7486c928c 100644 --- a/src/test/run-pass/issue-3609.rs +++ b/src/test/run-pass/issue-3609.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::thread::Thread; use std::sync::mpsc::Sender; use std::thunk::Invoke; diff --git a/src/test/run-pass/issue-3794.rs b/src/test/run-pass/issue-3794.rs index 926b53cf92c0d..91c938981c10b 100644 --- a/src/test/run-pass/issue-3794.rs +++ b/src/test/run-pass/issue-3794.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + trait T { fn print(&self); } diff --git a/src/test/run-pass/issue-3878.rs b/src/test/run-pass/issue-3878.rs index 063b2d7030147..5434e44c17376 100644 --- a/src/test/run-pass/issue-3878.rs +++ b/src/test/run-pass/issue-3878.rs @@ -9,6 +9,8 @@ // except according to those terms. #![allow(path_statement)] +#![allow(unknown_features)] +#![feature(box_syntax)] pub fn main() { let y = box 1i; diff --git a/src/test/run-pass/issue-4735.rs b/src/test/run-pass/issue-4735.rs index 7730d75a3a9c2..bf422bd0405a1 100644 --- a/src/test/run-pass/issue-4735.rs +++ b/src/test/run-pass/issue-4735.rs @@ -10,6 +10,9 @@ // ignore-fast doesn't like extern crate +#![allow(unknown_features)] +#![feature(box_syntax)] + extern crate libc; use std::mem::transmute; diff --git a/src/test/run-pass/issue-4759.rs b/src/test/run-pass/issue-4759.rs index 4b5c3566965f9..2245e80971a90 100644 --- a/src/test/run-pass/issue-4759.rs +++ b/src/test/run-pass/issue-4759.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] struct T { a: Box } diff --git a/src/test/run-pass/issue-5192.rs b/src/test/run-pass/issue-5192.rs index 3b1a8c4a19077..bb79cd4d04667 100644 --- a/src/test/run-pass/issue-5192.rs +++ b/src/test/run-pass/issue-5192.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] pub trait EventLoop { } diff --git a/src/test/run-pass/issue-5666.rs b/src/test/run-pass/issue-5666.rs index 222e1d54a5d99..e53f4c8692304 100644 --- a/src/test/run-pass/issue-5666.rs +++ b/src/test/run-pass/issue-5666.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] struct Dog { name : String diff --git a/src/test/run-pass/issue-5718.rs b/src/test/run-pass/issue-5718.rs index 589ccefd9ea28..36aa8a9cbca5d 100644 --- a/src/test/run-pass/issue-5718.rs +++ b/src/test/run-pass/issue-5718.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct Element; macro_rules! foo { diff --git a/src/test/run-pass/issue-5884.rs b/src/test/run-pass/issue-5884.rs index 4010c31eed50a..6502c66d85821 100644 --- a/src/test/run-pass/issue-5884.rs +++ b/src/test/run-pass/issue-5884.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] pub struct Foo { a: int, diff --git a/src/test/run-pass/issue-6117.rs b/src/test/run-pass/issue-6117.rs index e979bc86171ce..85de03dfe3426 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. +#![allow(unknown_features)] +#![feature(box_syntax)] enum Either { Left(T), Right(U) } diff --git a/src/test/run-pass/issue-6128.rs b/src/test/run-pass/issue-6128.rs index 4b31f39330932..d96862b588f9d 100644 --- a/src/test/run-pass/issue-6128.rs +++ b/src/test/run-pass/issue-6128.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + extern crate collections; use std::collections::HashMap; diff --git a/src/test/run-pass/issue-6318.rs b/src/test/run-pass/issue-6318.rs index 2b474b8cfbbe2..b9f1a8bda7b5e 100644 --- a/src/test/run-pass/issue-6318.rs +++ b/src/test/run-pass/issue-6318.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] pub enum Thing { A(Box) diff --git a/src/test/run-pass/issue-6557.rs b/src/test/run-pass/issue-6557.rs index 7061a17dcdd0c..3163f1393280a 100644 --- a/src/test/run-pass/issue-6557.rs +++ b/src/test/run-pass/issue-6557.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] fn foo(box (_x, _y): Box<(int, int)>) {} diff --git a/src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs b/src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs index a08bdb09d3daa..b6dfbb1ca42ad 100644 --- a/src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs +++ b/src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs @@ -14,6 +14,8 @@ */ +#![allow(unknown_features)] +#![feature(box_syntax)] pub fn main() {} diff --git a/src/test/run-pass/issue-8498.rs b/src/test/run-pass/issue-8498.rs index e4f4db6ea63b7..2a2ca4f071274 100644 --- a/src/test/run-pass/issue-8498.rs +++ b/src/test/run-pass/issue-8498.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { match &[(box 5i,box 7i)] { ps => { diff --git a/src/test/run-pass/issue-9129.rs b/src/test/run-pass/issue-9129.rs index 5d5240272e542..2ef1c1d264a40 100644 --- a/src/test/run-pass/issue-9129.rs +++ b/src/test/run-pass/issue-9129.rs @@ -10,6 +10,8 @@ // ignore-pretty +#![allow(unknown_features)] +#![feature(box_syntax)] pub trait bomb { fn boom(&self, Ident); } pub struct S; diff --git a/src/test/run-pass/issue-9382.rs b/src/test/run-pass/issue-9382.rs index 369f93222e13e..07212237305ef 100644 --- a/src/test/run-pass/issue-9382.rs +++ b/src/test/run-pass/issue-9382.rs @@ -9,6 +9,8 @@ // except according to those terms. #![allow(unnecessary_allocation)] +#![allow(unknown_features)] +#![feature(box_syntax)] // Tests for a previous bug that occurred due to an interaction // between struct field initialization and the auto-coercion diff --git a/src/test/run-pass/kindck-owned-trait-contains-1.rs b/src/test/run-pass/kindck-owned-trait-contains-1.rs index fbd6c92a02065..999fb2c4b69f3 100644 --- a/src/test/run-pass/kindck-owned-trait-contains-1.rs +++ b/src/test/run-pass/kindck-owned-trait-contains-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] trait repeat { fn get(&self) -> A; } diff --git a/src/test/run-pass/last-use-in-cap-clause.rs b/src/test/run-pass/last-use-in-cap-clause.rs index 6615bb6368fd7..9be9f0982642a 100644 --- a/src/test/run-pass/last-use-in-cap-clause.rs +++ b/src/test/run-pass/last-use-in-cap-clause.rs @@ -10,6 +10,8 @@ // Make sure #1399 stays fixed +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] struct A { a: Box } diff --git a/src/test/run-pass/last-use-is-capture.rs b/src/test/run-pass/last-use-is-capture.rs index 206d4db3db4f8..4a7e844268f61 100644 --- a/src/test/run-pass/last-use-is-capture.rs +++ b/src/test/run-pass/last-use-is-capture.rs @@ -10,6 +10,9 @@ // Make sure #1399 stays fixed +#![allow(unknown_features)] +#![feature(box_syntax)] + struct A { a: Box } pub fn main() { diff --git a/src/test/run-pass/leak-unique-as-tydesc.rs b/src/test/run-pass/leak-unique-as-tydesc.rs index b109e94b74f2b..65808de3cf42b 100644 --- a/src/test/run-pass/leak-unique-as-tydesc.rs +++ b/src/test/run-pass/leak-unique-as-tydesc.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] fn leaky(_t: T) { } diff --git a/src/test/run-pass/let-assignability.rs b/src/test/run-pass/let-assignability.rs index 6bea1aebc4588..9ac016d534f09 100644 --- a/src/test/run-pass/let-assignability.rs +++ b/src/test/run-pass/let-assignability.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn f() { let a = box 1; let b: &int = &*a; diff --git a/src/test/run-pass/list.rs b/src/test/run-pass/list.rs index 9b20398038d41..e55c1b36f3e24 100644 --- a/src/test/run-pass/list.rs +++ b/src/test/run-pass/list.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] enum list { cons(int, Box), nil, } diff --git a/src/test/run-pass/match-implicit-copy-unique.rs b/src/test/run-pass/match-implicit-copy-unique.rs index 0e7c959d58c33..6883187c402f3 100644 --- a/src/test/run-pass/match-implicit-copy-unique.rs +++ b/src/test/run-pass/match-implicit-copy-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] struct Pair { a: Box, b: Box } diff --git a/src/test/run-pass/match-unique-bind.rs b/src/test/run-pass/match-unique-bind.rs index 5c834a06a74db..ebe01a1d1f221 100644 --- a/src/test/run-pass/match-unique-bind.rs +++ b/src/test/run-pass/match-unique-bind.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { match box 100i { box x => { diff --git a/src/test/run-pass/match-value-binding-in-guard-3291.rs b/src/test/run-pass/match-value-binding-in-guard-3291.rs index 0e7e9be6765b4..beb125492b2c1 100644 --- a/src/test/run-pass/match-value-binding-in-guard-3291.rs +++ b/src/test/run-pass/match-value-binding-in-guard-3291.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] fn foo(x: Option>, b: bool) -> int { match x { diff --git a/src/test/run-pass/method-self-arg-aux1.rs b/src/test/run-pass/method-self-arg-aux1.rs index d4a0d514a7da6..e9a1e19d4bf84 100644 --- a/src/test/run-pass/method-self-arg-aux1.rs +++ b/src/test/run-pass/method-self-arg-aux1.rs @@ -10,6 +10,9 @@ // Test method calls with self as an argument (cross-crate) +#![allow(unknown_features)] +#![feature(box_syntax)] + // aux-build:method_self_arg1.rs extern crate method_self_arg1; use method_self_arg1::Foo; diff --git a/src/test/run-pass/method-self-arg-aux2.rs b/src/test/run-pass/method-self-arg-aux2.rs index b94f1ae6ba64e..7fa810ce1549a 100644 --- a/src/test/run-pass/method-self-arg-aux2.rs +++ b/src/test/run-pass/method-self-arg-aux2.rs @@ -10,6 +10,9 @@ // Test method calls with self as an argument (cross-crate) +#![allow(unknown_features)] +#![feature(box_syntax)] + // aux-build:method_self_arg2.rs extern crate method_self_arg2; use method_self_arg2::{Foo, Bar}; diff --git a/src/test/run-pass/method-self-arg-trait.rs b/src/test/run-pass/method-self-arg-trait.rs index 29d100beb064f..39018a873942e 100644 --- a/src/test/run-pass/method-self-arg-trait.rs +++ b/src/test/run-pass/method-self-arg-trait.rs @@ -10,6 +10,9 @@ // Test method calls with self as an argument +#![allow(unknown_features)] +#![feature(box_syntax)] + static mut COUNT: u64 = 1; struct Foo; diff --git a/src/test/run-pass/method-self-arg.rs b/src/test/run-pass/method-self-arg.rs index 788a25efcf987..ae15bc60746b2 100644 --- a/src/test/run-pass/method-self-arg.rs +++ b/src/test/run-pass/method-self-arg.rs @@ -10,6 +10,9 @@ // Test method calls with self as an argument +#![allow(unknown_features)] +#![feature(box_syntax)] + static mut COUNT: uint = 1; struct Foo; diff --git a/src/test/run-pass/method-two-trait-defer-resolution-2.rs b/src/test/run-pass/method-two-trait-defer-resolution-2.rs index cae783e7ea84a..b18c29dc3c136 100644 --- a/src/test/run-pass/method-two-trait-defer-resolution-2.rs +++ b/src/test/run-pass/method-two-trait-defer-resolution-2.rs @@ -16,6 +16,9 @@ // version will run (note that the `push` occurs after the call to // `foo()`). +#![allow(unknown_features)] +#![feature(box_syntax)] + trait Foo { fn foo(&self) -> int; } diff --git a/src/test/run-pass/move-1-unique.rs b/src/test/run-pass/move-1-unique.rs index 2da6076d13863..018cd440cad34 100644 --- a/src/test/run-pass/move-1-unique.rs +++ b/src/test/run-pass/move-1-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #[derive(Clone)] struct Triple { diff --git a/src/test/run-pass/move-2-unique.rs b/src/test/run-pass/move-2-unique.rs index 65d8281407c4f..50187ef8baad2 100644 --- a/src/test/run-pass/move-2-unique.rs +++ b/src/test/run-pass/move-2-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] struct X { x: int, y: int, z: int } diff --git a/src/test/run-pass/move-2.rs b/src/test/run-pass/move-2.rs index 04540c2f35b29..6561a9b2d5b56 100644 --- a/src/test/run-pass/move-2.rs +++ b/src/test/run-pass/move-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] struct X { x: int, y: int, z: int } diff --git a/src/test/run-pass/move-3-unique.rs b/src/test/run-pass/move-3-unique.rs index 2820e0d712056..a10e3f9f5b0d0 100644 --- a/src/test/run-pass/move-3-unique.rs +++ b/src/test/run-pass/move-3-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #[derive(Clone)] struct Triple { diff --git a/src/test/run-pass/move-4-unique.rs b/src/test/run-pass/move-4-unique.rs index 286781a482277..9e5eeef75527c 100644 --- a/src/test/run-pass/move-4-unique.rs +++ b/src/test/run-pass/move-4-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] struct Triple {a: int, b: int, c: int} diff --git a/src/test/run-pass/move-4.rs b/src/test/run-pass/move-4.rs index 5e5d01ae6ee45..c902677c64531 100644 --- a/src/test/run-pass/move-4.rs +++ b/src/test/run-pass/move-4.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] struct Triple { a: int, b: int, c: int } diff --git a/src/test/run-pass/move-arg-2-unique.rs b/src/test/run-pass/move-arg-2-unique.rs index 29fd070fc19d2..e496e9e210533 100644 --- a/src/test/run-pass/move-arg-2-unique.rs +++ b/src/test/run-pass/move-arg-2-unique.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] fn test(foo: Box> ) { assert!(((*foo)[0] == 10)); } diff --git a/src/test/run-pass/move-arg-2.rs b/src/test/run-pass/move-arg-2.rs index 0f3d0baecbe51..fdb6799b90f79 100644 --- a/src/test/run-pass/move-arg-2.rs +++ b/src/test/run-pass/move-arg-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] fn test(foo: Box>) { assert!(((*foo)[0] == 10)); } diff --git a/src/test/run-pass/mut-function-arguments.rs b/src/test/run-pass/mut-function-arguments.rs index f80728519136e..388b814b2af10 100644 --- a/src/test/run-pass/mut-function-arguments.rs +++ b/src/test/run-pass/mut-function-arguments.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] fn f(mut y: Box) { *y = 5; diff --git a/src/test/run-pass/new-box-syntax.rs b/src/test/run-pass/new-box-syntax.rs index 991d0ecdc87a6..4ea51b3b409aa 100644 --- a/src/test/run-pass/new-box-syntax.rs +++ b/src/test/run-pass/new-box-syntax.rs @@ -11,6 +11,9 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ +#![allow(unknown_features)] +#![feature(box_syntax)] + // Tests that the new `box` syntax works with unique pointers. use std::boxed::{Box, HEAP}; diff --git a/src/test/run-pass/new-box.rs b/src/test/run-pass/new-box.rs index 8531fd5f975ac..1f2207ad87378 100644 --- a/src/test/run-pass/new-box.rs +++ b/src/test/run-pass/new-box.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] fn f(x: Box) { let y: &int = &*x; diff --git a/src/test/run-pass/newlambdas-ret-infer.rs b/src/test/run-pass/newlambdas-ret-infer.rs index d74f1349506c1..130cdc85b013d 100644 --- a/src/test/run-pass/newlambdas-ret-infer.rs +++ b/src/test/run-pass/newlambdas-ret-infer.rs @@ -11,6 +11,9 @@ // Test that the lambda kind is inferred correctly as a return // expression +#![allow(unknown_features)] +#![feature(box_syntax)] + fn unique() -> Box { return box || (); } pub fn main() { diff --git a/src/test/run-pass/newlambdas-ret-infer2.rs b/src/test/run-pass/newlambdas-ret-infer2.rs index 43a6ac296e9dc..0952bedd6e309 100644 --- a/src/test/run-pass/newlambdas-ret-infer2.rs +++ b/src/test/run-pass/newlambdas-ret-infer2.rs @@ -11,6 +11,9 @@ // Test that the lambda kind is inferred correctly as a return // expression +#![allow(unknown_features)] +#![feature(box_syntax)] + fn unique() -> Box { box || () } pub fn main() { diff --git a/src/test/run-pass/nullable-pointer-iotareduction.rs b/src/test/run-pass/nullable-pointer-iotareduction.rs index 0293c4e36ac59..bb62b1599a4fe 100644 --- a/src/test/run-pass/nullable-pointer-iotareduction.rs +++ b/src/test/run-pass/nullable-pointer-iotareduction.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::{option, mem}; // Iota-reduction is a rule in the Calculus of (Co-)Inductive Constructions, diff --git a/src/test/run-pass/object-one-type-two-traits.rs b/src/test/run-pass/object-one-type-two-traits.rs index 4964b3f672844..ebdf3c08a2263 100644 --- a/src/test/run-pass/object-one-type-two-traits.rs +++ b/src/test/run-pass/object-one-type-two-traits.rs @@ -11,6 +11,9 @@ // Testing creating two vtables with the same self type, but different // traits. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::any::Any; trait Wrap { diff --git a/src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs b/src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs index ab3d39e273371..cd97c34f8c6a6 100644 --- a/src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs +++ b/src/test/run-pass/objects-owned-object-borrowed-method-headerless.rs @@ -12,6 +12,9 @@ // closed over do not contain managed values, and thus the boxes do // not have headers. +#![allow(unknown_features)] +#![feature(box_syntax)] + trait FooTrait { fn foo(&self) -> uint; diff --git a/src/test/run-pass/objects-owned-object-owned-method.rs b/src/test/run-pass/objects-owned-object-owned-method.rs index 14ddc5d660f0c..d355999c50606 100644 --- a/src/test/run-pass/objects-owned-object-owned-method.rs +++ b/src/test/run-pass/objects-owned-object-owned-method.rs @@ -12,6 +12,8 @@ // closed over contain managed values. This implies that the boxes // will have headers that must be skipped over. +#![allow(unknown_features)] +#![feature(box_syntax)] trait FooTrait { fn foo(self: Box) -> uint; diff --git a/src/test/run-pass/output-slot-variants.rs b/src/test/run-pass/output-slot-variants.rs index 8a10cc8c1ef4b..fb87cd5eb69cd 100644 --- a/src/test/run-pass/output-slot-variants.rs +++ b/src/test/run-pass/output-slot-variants.rs @@ -10,6 +10,8 @@ #![allow(dead_assignment)] #![allow(unused_variable)] +#![allow(unknown_features)] +#![feature(box_syntax)] struct A { a: int, b: int } struct Abox { a: Box, b: Box } diff --git a/src/test/run-pass/overloaded-autoderef.rs b/src/test/run-pass/overloaded-autoderef.rs index 949a7b158d41c..5831d500b8393 100644 --- a/src/test/run-pass/overloaded-autoderef.rs +++ b/src/test/run-pass/overloaded-autoderef.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::cell::RefCell; use std::rc::Rc; use std::num::ToPrimitive; diff --git a/src/test/run-pass/overloaded-deref.rs b/src/test/run-pass/overloaded-deref.rs index 1251394a549d6..a2cc7b7dfea57 100644 --- a/src/test/run-pass/overloaded-deref.rs +++ b/src/test/run-pass/overloaded-deref.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::cell::RefCell; use std::rc::Rc; use std::string::String; diff --git a/src/test/run-pass/overloaded-index-autoderef.rs b/src/test/run-pass/overloaded-index-autoderef.rs index bc67c0afc7b52..637d2c9469445 100644 --- a/src/test/run-pass/overloaded-index-autoderef.rs +++ b/src/test/run-pass/overloaded-index-autoderef.rs @@ -10,6 +10,9 @@ // Test overloaded indexing combined with autoderef. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::ops::{Index, IndexMut}; struct Foo { diff --git a/src/test/run-pass/owned-implies-static.rs b/src/test/run-pass/owned-implies-static.rs index 498b81d307e29..e784318fc762f 100644 --- a/src/test/run-pass/owned-implies-static.rs +++ b/src/test/run-pass/owned-implies-static.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn f(_x: T) {} pub fn main() { diff --git a/src/test/run-pass/pure-sum.rs b/src/test/run-pass/pure-sum.rs index 3b2897cf3a6f5..7fbdd2f219e14 100644 --- a/src/test/run-pass/pure-sum.rs +++ b/src/test/run-pass/pure-sum.rs @@ -10,6 +10,8 @@ // Check that functions can modify local state. +#![allow(unknown_features)] +#![feature(box_syntax)] fn sums_to(v: Vec , sum: int) -> bool { let mut i = 0u; diff --git a/src/test/run-pass/rcvr-borrowed-to-region.rs b/src/test/run-pass/rcvr-borrowed-to-region.rs index 8ad2dbc1acb75..84a230fd5767c 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. +#![allow(unknown_features)] +#![feature(box_syntax)] trait get { fn get(self) -> int; diff --git a/src/test/run-pass/regions-borrow-at.rs b/src/test/run-pass/regions-borrow-at.rs index 9a758c5d8ada4..ba86e3f7b57b3 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. +#![allow(unknown_features)] +#![feature(box_syntax)] fn foo(x: &uint) -> uint { *x diff --git a/src/test/run-pass/regions-borrow-uniq.rs b/src/test/run-pass/regions-borrow-uniq.rs index 36f7d88f7d797..30a22512d2a7f 100644 --- a/src/test/run-pass/regions-borrow-uniq.rs +++ b/src/test/run-pass/regions-borrow-uniq.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn foo(x: &uint) -> uint { *x } diff --git a/src/test/run-pass/regions-close-over-type-parameter-successfully.rs b/src/test/run-pass/regions-close-over-type-parameter-successfully.rs index 5dba80ad38a16..3922cb1219c03 100644 --- a/src/test/run-pass/regions-close-over-type-parameter-successfully.rs +++ b/src/test/run-pass/regions-close-over-type-parameter-successfully.rs @@ -11,6 +11,9 @@ // A test where we (successfully) close over a reference into // an object. +#![allow(unknown_features)] +#![feature(box_syntax)] + trait SomeTrait { fn get(&self) -> int; } impl<'a> SomeTrait for &'a int { diff --git a/src/test/run-pass/regions-copy-closure.rs b/src/test/run-pass/regions-copy-closure.rs index a7724e68310a7..0152793d96c6c 100644 --- a/src/test/run-pass/regions-copy-closure.rs +++ b/src/test/run-pass/regions-copy-closure.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] struct closure_box<'a> { diff --git a/src/test/run-pass/regions-dependent-addr-of.rs b/src/test/run-pass/regions-dependent-addr-of.rs index 41396ef01bee8..e38a472fa4c8f 100644 --- a/src/test/run-pass/regions-dependent-addr-of.rs +++ b/src/test/run-pass/regions-dependent-addr-of.rs @@ -11,6 +11,8 @@ // Test lifetimes are linked properly when we create dependent region pointers. // Issue #3148. +#![allow(unknown_features)] +#![feature(box_syntax)] struct A { value: B 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 907f610ff25db..3267ff2c7e0e7 100644 --- a/src/test/run-pass/regions-early-bound-trait-param.rs +++ b/src/test/run-pass/regions-early-bound-trait-param.rs @@ -11,6 +11,8 @@ // Tests that you can use an early-bound lifetime parameter as // on of the generic parameters in a trait. +#![allow(unknown_features)] +#![feature(box_syntax)] trait Trait<'a> { fn long(&'a self) -> int; 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 5b0b7cc5b4ef1..9637c43170f6b 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. +#![allow(unknown_features)] +#![feature(box_syntax)] fn foo(x: &uint) -> &uint { x } fn bar(x: &uint) -> uint { *x } diff --git a/src/test/run-pass/regions-fn-subtyping.rs b/src/test/run-pass/regions-fn-subtyping.rs index e9f774150dcfd..faa9b37bdcc63 100644 --- a/src/test/run-pass/regions-fn-subtyping.rs +++ b/src/test/run-pass/regions-fn-subtyping.rs @@ -12,6 +12,8 @@ #![allow(dead_assignment)] #![allow(unused_variable)] +#![allow(unknown_features)] +#![feature(box_syntax)] // Should pass region checking. fn ok(f: Box) { 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 1ecaf41702e06..f397b5124caf5 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,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn borrow(x: &T) -> &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 d3dbca53f605f..708d031a68a63 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. +#![allow(unknown_features)] +#![feature(box_syntax)] struct Point {x: int, y: int} diff --git a/src/test/run-pass/regions-lifetime-nonfree-late-bound.rs b/src/test/run-pass/regions-lifetime-nonfree-late-bound.rs index c796566b79d57..c4852c9162cab 100644 --- a/src/test/run-pass/regions-lifetime-nonfree-late-bound.rs +++ b/src/test/run-pass/regions-lifetime-nonfree-late-bound.rs @@ -22,6 +22,9 @@ // doing region-folding, when really all clients of the region-folding // case only want to see FREE lifetime variables, not bound ones. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { fn explicit() { fn test(_x: Option>) where F: FnMut(Box FnMut(&'a int)>) {} diff --git a/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs b/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs index 6eb981046163e..e779e002b2990 100644 --- a/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs +++ b/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs @@ -17,6 +17,9 @@ // changes were caught. However, those uses in the compiler could // easily get changed or refactored away in the future. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct Ctxt<'tcx> { x: &'tcx Vec } diff --git a/src/test/run-pass/regions-static-closure.rs b/src/test/run-pass/regions-static-closure.rs index 0f36dc0457544..abd5789bb1f76 100644 --- a/src/test/run-pass/regions-static-closure.rs +++ b/src/test/run-pass/regions-static-closure.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] struct closure_box<'a> { diff --git a/src/test/run-pass/rust-log-filter.rs b/src/test/run-pass/rust-log-filter.rs index 95f90ebbf8edf..28d47f7aa9be5 100644 --- a/src/test/run-pass/rust-log-filter.rs +++ b/src/test/run-pass/rust-log-filter.rs @@ -10,6 +10,9 @@ // exec-env:RUST_LOG=rust-log-filter/f.o +#![allow(unknown_features)] +#![feature(box_syntax)] + #[macro_use] extern crate log; diff --git a/src/test/run-pass/self-impl.rs b/src/test/run-pass/self-impl.rs index 74416b96e9360..40a4dc52a70b3 100644 --- a/src/test/run-pass/self-impl.rs +++ b/src/test/run-pass/self-impl.rs @@ -10,6 +10,9 @@ // Test that we can use `Self` types in impls in the expected way. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct Foo; // Test uses on inherent impl. diff --git a/src/test/run-pass/self-in-mut-slot-default-method.rs b/src/test/run-pass/self-in-mut-slot-default-method.rs index bced8012b6832..e934498ea0506 100644 --- a/src/test/run-pass/self-in-mut-slot-default-method.rs +++ b/src/test/run-pass/self-in-mut-slot-default-method.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] struct X { a: int diff --git a/src/test/run-pass/self-re-assign.rs b/src/test/run-pass/self-re-assign.rs index 75fb98f8e24f9..3092898d98652 100644 --- a/src/test/run-pass/self-re-assign.rs +++ b/src/test/run-pass/self-re-assign.rs @@ -11,6 +11,9 @@ // Ensure assigning an owned or managed variable to itself works. In particular, // that we do not glue_drop before we glue_take (#3290). +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::rc::Rc; pub fn main() { diff --git a/src/test/run-pass/sendfn-spawn-with-fn-arg.rs b/src/test/run-pass/sendfn-spawn-with-fn-arg.rs index a6e4716c3b8a3..89624c3ac16a3 100644 --- a/src/test/run-pass/sendfn-spawn-with-fn-arg.rs +++ b/src/test/run-pass/sendfn-spawn-with-fn-arg.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::thread::Thread; pub fn main() { test05(); } diff --git a/src/test/run-pass/show-boxed-slice.rs b/src/test/run-pass/show-boxed-slice.rs index e0d005a485bc0..fc0b501e9c523 100644 --- a/src/test/run-pass/show-boxed-slice.rs +++ b/src/test/run-pass/show-boxed-slice.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + #[derive(Show)] struct Foo(Box<[u8]>); diff --git a/src/test/run-pass/task-spawn-move-and-copy.rs b/src/test/run-pass/task-spawn-move-and-copy.rs index b2bcf395783ae..ca2a8cf5506ee 100644 --- a/src/test/run-pass/task-spawn-move-and-copy.rs +++ b/src/test/run-pass/task-spawn-move-and-copy.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::thread::Thread; use std::sync::mpsc::channel; diff --git a/src/test/run-pass/task-stderr.rs b/src/test/run-pass/task-stderr.rs index 7ff5960375cb2..5e6247bac93f9 100644 --- a/src/test/run-pass/task-stderr.rs +++ b/src/test/run-pass/task-stderr.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::sync::mpsc::channel; use std::io::{ChanReader, ChanWriter}; use std::thread; diff --git a/src/test/run-pass/trait-bounds-in-arc.rs b/src/test/run-pass/trait-bounds-in-arc.rs index bc397bb63196e..0089646d0a14a 100644 --- a/src/test/run-pass/trait-bounds-in-arc.rs +++ b/src/test/run-pass/trait-bounds-in-arc.rs @@ -13,6 +13,8 @@ // ignore-pretty +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] use std::sync::Arc; diff --git a/src/test/run-pass/trait-coercion-generic.rs b/src/test/run-pass/trait-coercion-generic.rs index 7d924f977cbef..22db6c64770ec 100644 --- a/src/test/run-pass/trait-coercion-generic.rs +++ b/src/test/run-pass/trait-coercion-generic.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] trait Trait { fn f(&self, x: T); diff --git a/src/test/run-pass/trait-coercion.rs b/src/test/run-pass/trait-coercion.rs index 37d69ddfe0766..0d4a05bed7f56 100644 --- a/src/test/run-pass/trait-coercion.rs +++ b/src/test/run-pass/trait-coercion.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::io; trait Trait { diff --git a/src/test/run-pass/trait-contravariant-self.rs b/src/test/run-pass/trait-contravariant-self.rs index e06e01b9e0512..19d76b8890118 100644 --- a/src/test/run-pass/trait-contravariant-self.rs +++ b/src/test/run-pass/trait-contravariant-self.rs @@ -22,6 +22,9 @@ // 4. `Bar for Box <: Bar for Box` because // `Box <: Box`. +#![allow(unknown_features)] +#![feature(box_syntax)] + trait Foo { } struct SFoo; impl Foo for SFoo { } diff --git a/src/test/run-pass/trait-object-generics.rs b/src/test/run-pass/trait-object-generics.rs index 81aa5daaf91ce..76352c799a0f2 100644 --- a/src/test/run-pass/trait-object-generics.rs +++ b/src/test/run-pass/trait-object-generics.rs @@ -10,6 +10,8 @@ // test for #8664 +#![allow(unknown_features)] +#![feature(box_syntax)] pub trait Trait2 { fn doit(&self); diff --git a/src/test/run-pass/traits-conditional-dispatch.rs b/src/test/run-pass/traits-conditional-dispatch.rs index a94f73c2b6da7..7e2b7ae0663b9 100644 --- a/src/test/run-pass/traits-conditional-dispatch.rs +++ b/src/test/run-pass/traits-conditional-dispatch.rs @@ -12,6 +12,9 @@ // blanket impl for T:Copy coexists with an impl for Box, because // Box does not impl Copy. +#![allow(unknown_features)] +#![feature(box_syntax)] + trait Get { fn get(&self) -> Self; } diff --git a/src/test/run-pass/type-param-constraints.rs b/src/test/run-pass/type-param-constraints.rs index 7265ddf661501..3fcb04d6848e8 100644 --- a/src/test/run-pass/type-param-constraints.rs +++ b/src/test/run-pass/type-param-constraints.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] fn p_foo(_pinned: T) { } fn s_foo(_shared: T) { } diff --git a/src/test/run-pass/typeclasses-eq-example-static.rs b/src/test/run-pass/typeclasses-eq-example-static.rs index 63a59b6f750ea..20a28c5a9ead9 100644 --- a/src/test/run-pass/typeclasses-eq-example-static.rs +++ b/src/test/run-pass/typeclasses-eq-example-static.rs @@ -9,6 +9,9 @@ // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + // Example from lkuper's intern talk, August 2012 -- now with static // methods! use Color::{cyan, magenta, yellow, black}; diff --git a/src/test/run-pass/typeclasses-eq-example.rs b/src/test/run-pass/typeclasses-eq-example.rs index 431a9383b3bd3..aa290edd8631a 100644 --- a/src/test/run-pass/typeclasses-eq-example.rs +++ b/src/test/run-pass/typeclasses-eq-example.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] // Example from lkuper's intern talk, August 2012. use Color::{cyan, magenta, yellow, black}; diff --git a/src/test/run-pass/ufcs-explicit-self.rs b/src/test/run-pass/ufcs-explicit-self.rs index b6b9fb67f9053..968f3511247c6 100644 --- a/src/test/run-pass/ufcs-explicit-self.rs +++ b/src/test/run-pass/ufcs-explicit-self.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct Foo { f: int, } diff --git a/src/test/run-pass/unboxed-closures-boxed.rs b/src/test/run-pass/unboxed-closures-boxed.rs index 60e59400e1a09..dc35d5bf2caca 100644 --- a/src/test/run-pass/unboxed-closures-boxed.rs +++ b/src/test/run-pass/unboxed-closures-boxed.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] use std::ops::FnMut; diff --git a/src/test/run-pass/unboxed-closures-call-sugar-object-autoderef.rs b/src/test/run-pass/unboxed-closures-call-sugar-object-autoderef.rs index 8909f4e261faa..da647e90c00f6 100644 --- a/src/test/run-pass/unboxed-closures-call-sugar-object-autoderef.rs +++ b/src/test/run-pass/unboxed-closures-call-sugar-object-autoderef.rs @@ -10,6 +10,8 @@ // Test that the call operator autoderefs when calling to an object type. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] use std::ops::FnMut; diff --git a/src/test/run-pass/unboxed-closures-call-sugar-object.rs b/src/test/run-pass/unboxed-closures-call-sugar-object.rs index 2dec53cc13afb..8ee3c96f580d1 100644 --- a/src/test/run-pass/unboxed-closures-call-sugar-object.rs +++ b/src/test/run-pass/unboxed-closures-call-sugar-object.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] use std::ops::FnMut; diff --git a/src/test/run-pass/unboxed-closures-monomorphization.rs b/src/test/run-pass/unboxed-closures-monomorphization.rs index 52855f826731c..6701f879e4f2b 100644 --- a/src/test/run-pass/unboxed-closures-monomorphization.rs +++ b/src/test/run-pass/unboxed-closures-monomorphization.rs @@ -11,6 +11,8 @@ // Test that unboxed closures in contexts with free type parameters // monomorphize correctly (issue #16791) +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] fn main(){ diff --git a/src/test/run-pass/unboxed-closures-prelude.rs b/src/test/run-pass/unboxed-closures-prelude.rs index d1bd7e908c826..915715727e8e6 100644 --- a/src/test/run-pass/unboxed-closures-prelude.rs +++ b/src/test/run-pass/unboxed-closures-prelude.rs @@ -10,6 +10,8 @@ // Tests that the reexports of `FnOnce` et al from the prelude work. +#![allow(unknown_features)] +#![feature(box_syntax)] #![feature(unboxed_closures)] fn main() { diff --git a/src/test/run-pass/uniq-self-in-mut-slot.rs b/src/test/run-pass/uniq-self-in-mut-slot.rs index 4d7830e1cdca1..b7980ed9021e2 100644 --- a/src/test/run-pass/uniq-self-in-mut-slot.rs +++ b/src/test/run-pass/uniq-self-in-mut-slot.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] struct X { a: int diff --git a/src/test/run-pass/unique-assign-copy.rs b/src/test/run-pass/unique-assign-copy.rs index fb5f6e4a8aa19..9e3d9544d427e 100644 --- a/src/test/run-pass/unique-assign-copy.rs +++ b/src/test/run-pass/unique-assign-copy.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let mut i = box 1i; // Should be a copy diff --git a/src/test/run-pass/unique-assign-drop.rs b/src/test/run-pass/unique-assign-drop.rs index 505e9b46e03c7..81c4b6ab7e514 100644 --- a/src/test/run-pass/unique-assign-drop.rs +++ b/src/test/run-pass/unique-assign-drop.rs @@ -9,6 +9,8 @@ // except according to those terms. #![allow(dead_assignment)] +#![allow(unknown_features)] +#![feature(box_syntax)] pub fn main() { let i = box 1i; diff --git a/src/test/run-pass/unique-assign-generic.rs b/src/test/run-pass/unique-assign-generic.rs index 493ec8ddc207d..7c9bbd6417177 100644 --- a/src/test/run-pass/unique-assign-generic.rs +++ b/src/test/run-pass/unique-assign-generic.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn f(t: T) -> T { let t1 = t; diff --git a/src/test/run-pass/unique-assign.rs b/src/test/run-pass/unique-assign.rs index 64d65a7b2e524..199657fd995d6 100644 --- a/src/test/run-pass/unique-assign.rs +++ b/src/test/run-pass/unique-assign.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let mut i; i = box 1i; diff --git a/src/test/run-pass/unique-autoderef-field.rs b/src/test/run-pass/unique-autoderef-field.rs index 67f96decaa9da..aab7f4108fba6 100644 --- a/src/test/run-pass/unique-autoderef-field.rs +++ b/src/test/run-pass/unique-autoderef-field.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct J { j: int } pub fn main() { diff --git a/src/test/run-pass/unique-autoderef-index.rs b/src/test/run-pass/unique-autoderef-index.rs index f9bd5114e7da9..1c7b4c534ed81 100644 --- a/src/test/run-pass/unique-autoderef-index.rs +++ b/src/test/run-pass/unique-autoderef-index.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] pub fn main() { let i = box vec!(100i); diff --git a/src/test/run-pass/unique-cmp.rs b/src/test/run-pass/unique-cmp.rs index 38be635d83726..dba4d8db8496f 100644 --- a/src/test/run-pass/unique-cmp.rs +++ b/src/test/run-pass/unique-cmp.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let i = box 100i; assert!(i == box 100i); diff --git a/src/test/run-pass/unique-containing-tag.rs b/src/test/run-pass/unique-containing-tag.rs index ccb21b605c191..e4099c94c2f1a 100644 --- a/src/test/run-pass/unique-containing-tag.rs +++ b/src/test/run-pass/unique-containing-tag.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { enum t { t1(int), t2(int), } diff --git a/src/test/run-pass/unique-create.rs b/src/test/run-pass/unique-create.rs index acd405e2659af..cec74d251b304 100644 --- a/src/test/run-pass/unique-create.rs +++ b/src/test/run-pass/unique-create.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { box 100i; } diff --git a/src/test/run-pass/unique-decl-init-copy.rs b/src/test/run-pass/unique-decl-init-copy.rs index ddc2bb6c30f17..d0ad03b773c3b 100644 --- a/src/test/run-pass/unique-decl-init-copy.rs +++ b/src/test/run-pass/unique-decl-init-copy.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let mut i = box 1i; // Should be a copy diff --git a/src/test/run-pass/unique-decl-init.rs b/src/test/run-pass/unique-decl-init.rs index 1d98cfb6b4bfb..d7c19eb63588c 100644 --- a/src/test/run-pass/unique-decl-init.rs +++ b/src/test/run-pass/unique-decl-init.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let i = box 1i; let j = i; diff --git a/src/test/run-pass/unique-decl-move.rs b/src/test/run-pass/unique-decl-move.rs index e2e7b2ec771aa..0acdc8f3b8029 100644 --- a/src/test/run-pass/unique-decl-move.rs +++ b/src/test/run-pass/unique-decl-move.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let i = box 100i; let j = i; diff --git a/src/test/run-pass/unique-deref.rs b/src/test/run-pass/unique-deref.rs index 37ca58913ab39..752ea830aa5dd 100644 --- a/src/test/run-pass/unique-deref.rs +++ b/src/test/run-pass/unique-deref.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let i = box 100i; assert_eq!(*i, 100); diff --git a/src/test/run-pass/unique-destructure.rs b/src/test/run-pass/unique-destructure.rs index 0b3041f2249e1..3213146cbf4a7 100644 --- a/src/test/run-pass/unique-destructure.rs +++ b/src/test/run-pass/unique-destructure.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct Foo { a: int, b: int } pub fn main() { diff --git a/src/test/run-pass/unique-drop-complex.rs b/src/test/run-pass/unique-drop-complex.rs index a4b6ff5accff2..ec2c9f8c6661d 100644 --- a/src/test/run-pass/unique-drop-complex.rs +++ b/src/test/run-pass/unique-drop-complex.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let _x = box vec!(0i,0,0,0,0); } diff --git a/src/test/run-pass/unique-fn-arg-move.rs b/src/test/run-pass/unique-fn-arg-move.rs index 68290d85d0e62..0e47d39e55f50 100644 --- a/src/test/run-pass/unique-fn-arg-move.rs +++ b/src/test/run-pass/unique-fn-arg-move.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn f(i: Box) { assert_eq!(*i, 100); } diff --git a/src/test/run-pass/unique-fn-arg-mut.rs b/src/test/run-pass/unique-fn-arg-mut.rs index ccf6a4fd7aeae..e1d148cc9a555 100644 --- a/src/test/run-pass/unique-fn-arg-mut.rs +++ b/src/test/run-pass/unique-fn-arg-mut.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] fn f(i: &mut Box) { *i = box 200; diff --git a/src/test/run-pass/unique-fn-arg.rs b/src/test/run-pass/unique-fn-arg.rs index 6769011cffef8..301994a74a85a 100644 --- a/src/test/run-pass/unique-fn-arg.rs +++ b/src/test/run-pass/unique-fn-arg.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] fn f(i: Box) { assert_eq!(*i, 100); diff --git a/src/test/run-pass/unique-fn-ret.rs b/src/test/run-pass/unique-fn-ret.rs index 8493652cf8a08..de2c265089bed 100644 --- a/src/test/run-pass/unique-fn-ret.rs +++ b/src/test/run-pass/unique-fn-ret.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] fn f() -> Box { box 100 diff --git a/src/test/run-pass/unique-in-tag.rs b/src/test/run-pass/unique-in-tag.rs index ffff9b98f54e8..4f02018346bdb 100644 --- a/src/test/run-pass/unique-in-tag.rs +++ b/src/test/run-pass/unique-in-tag.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn test1() { enum bar { u(Box), w(int), } diff --git a/src/test/run-pass/unique-in-vec-copy.rs b/src/test/run-pass/unique-in-vec-copy.rs index 577a8f1430b2f..4620815e74e9e 100644 --- a/src/test/run-pass/unique-in-vec-copy.rs +++ b/src/test/run-pass/unique-in-vec-copy.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] pub fn main() { let mut a = vec!(box 10i); diff --git a/src/test/run-pass/unique-in-vec.rs b/src/test/run-pass/unique-in-vec.rs index 0f8527664b92e..389ca2c18b1bf 100644 --- a/src/test/run-pass/unique-in-vec.rs +++ b/src/test/run-pass/unique-in-vec.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let vect = vec!(box 100i); assert!(vect[0] == box 100); diff --git a/src/test/run-pass/unique-init.rs b/src/test/run-pass/unique-init.rs index 6e58ec23a3b03..b36d08364a2f8 100644 --- a/src/test/run-pass/unique-init.rs +++ b/src/test/run-pass/unique-init.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let _i = box 100i; } diff --git a/src/test/run-pass/unique-kinds.rs b/src/test/run-pass/unique-kinds.rs index d3f4a8b109016..56f7a3f7990e5 100644 --- a/src/test/run-pass/unique-kinds.rs +++ b/src/test/run-pass/unique-kinds.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::cmp::PartialEq; fn sendable() { diff --git a/src/test/run-pass/unique-log.rs b/src/test/run-pass/unique-log.rs index bae87230ba052..05579796dab90 100644 --- a/src/test/run-pass/unique-log.rs +++ b/src/test/run-pass/unique-log.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let i = box 100i; println!("{}", i); diff --git a/src/test/run-pass/unique-match-discrim.rs b/src/test/run-pass/unique-match-discrim.rs index 68b46db3a947b..a1502c2eb8c0f 100644 --- a/src/test/run-pass/unique-match-discrim.rs +++ b/src/test/run-pass/unique-match-discrim.rs @@ -10,6 +10,9 @@ // Issue #961 +#![allow(unknown_features)] +#![feature(box_syntax)] + fn altsimple() { match box true { _ => { } diff --git a/src/test/run-pass/unique-move-drop.rs b/src/test/run-pass/unique-move-drop.rs index 1b6ef92865c99..1388c6c5d2ba5 100644 --- a/src/test/run-pass/unique-move-drop.rs +++ b/src/test/run-pass/unique-move-drop.rs @@ -9,6 +9,8 @@ // except according to those terms. #![allow(unused_variable)] +#![allow(unknown_features)] +#![feature(box_syntax)] pub fn main() { let i = box 100i; diff --git a/src/test/run-pass/unique-move-temp.rs b/src/test/run-pass/unique-move-temp.rs index 1902fabe6399c..af82d3e14eae5 100644 --- a/src/test/run-pass/unique-move-temp.rs +++ b/src/test/run-pass/unique-move-temp.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let mut i; i = box 100i; diff --git a/src/test/run-pass/unique-move.rs b/src/test/run-pass/unique-move.rs index 398db63ce080d..791c4799bf07b 100644 --- a/src/test/run-pass/unique-move.rs +++ b/src/test/run-pass/unique-move.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let i = box 100i; let mut j; diff --git a/src/test/run-pass/unique-mutable.rs b/src/test/run-pass/unique-mutable.rs index eebb170559017..c4f860d930b8c 100644 --- a/src/test/run-pass/unique-mutable.rs +++ b/src/test/run-pass/unique-mutable.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let mut i = box 0i; *i = 1; diff --git a/src/test/run-pass/unique-object-move.rs b/src/test/run-pass/unique-object-move.rs index 6d0432faf5514..cec523a06712e 100644 --- a/src/test/run-pass/unique-object-move.rs +++ b/src/test/run-pass/unique-object-move.rs @@ -10,6 +10,8 @@ // Issue #5192 +#![allow(unknown_features)] +#![feature(box_syntax)] pub trait EventLoop { } diff --git a/src/test/run-pass/unique-pat-2.rs b/src/test/run-pass/unique-pat-2.rs index bf99f06f58ab5..eab775fc1db4e 100644 --- a/src/test/run-pass/unique-pat-2.rs +++ b/src/test/run-pass/unique-pat-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] struct Foo {a: int, b: uint} diff --git a/src/test/run-pass/unique-pat-3.rs b/src/test/run-pass/unique-pat-3.rs index 559d8f8cb3ca1..42a4b1a9c0cbf 100644 --- a/src/test/run-pass/unique-pat-3.rs +++ b/src/test/run-pass/unique-pat-3.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + enum bar { u(Box), w(int), } pub fn main() { diff --git a/src/test/run-pass/unique-pat.rs b/src/test/run-pass/unique-pat.rs index a0eee7e3cb6ee..ee975b9c81a03 100644 --- a/src/test/run-pass/unique-pat.rs +++ b/src/test/run-pass/unique-pat.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + fn simple() { match box true { box true => { } diff --git a/src/test/run-pass/unique-rec.rs b/src/test/run-pass/unique-rec.rs index ff7f009990da7..756911d29fc8c 100644 --- a/src/test/run-pass/unique-rec.rs +++ b/src/test/run-pass/unique-rec.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + struct X { x: int } pub fn main() { diff --git a/src/test/run-pass/unique-send-2.rs b/src/test/run-pass/unique-send-2.rs index ba75c7629b514..90f4b2e634440 100644 --- a/src/test/run-pass/unique-send-2.rs +++ b/src/test/run-pass/unique-send-2.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::sync::mpsc::{channel, Sender}; use std::thread::Thread; diff --git a/src/test/run-pass/unique-send.rs b/src/test/run-pass/unique-send.rs index afafb204c1c9f..1372858545557 100644 --- a/src/test/run-pass/unique-send.rs +++ b/src/test/run-pass/unique-send.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::sync::mpsc::channel; pub fn main() { diff --git a/src/test/run-pass/unique-swap.rs b/src/test/run-pass/unique-swap.rs index d467d042e4e42..cd3b59a69bab8 100644 --- a/src/test/run-pass/unique-swap.rs +++ b/src/test/run-pass/unique-swap.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::mem::swap; pub fn main() { diff --git a/src/test/run-pass/unsized2.rs b/src/test/run-pass/unsized2.rs index c7e8b2a05ec5b..285100dd7197c 100644 --- a/src/test/run-pass/unsized2.rs +++ b/src/test/run-pass/unsized2.rs @@ -10,6 +10,9 @@ // // ignore-lexer-test FIXME #15879 +#![allow(unknown_features)] +#![feature(box_syntax)] + // Test sized-ness checking in substitution. // Unbounded. diff --git a/src/test/run-pass/unsized3.rs b/src/test/run-pass/unsized3.rs index 271f5817c9e79..983152cd056d9 100644 --- a/src/test/run-pass/unsized3.rs +++ b/src/test/run-pass/unsized3.rs @@ -10,6 +10,9 @@ // Test structs with always-unsized fields. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::mem; use std::raw; diff --git a/src/test/run-pass/unused-move-capture.rs b/src/test/run-pass/unused-move-capture.rs index bd20a174d1e49..27945f469205f 100644 --- a/src/test/run-pass/unused-move-capture.rs +++ b/src/test/run-pass/unused-move-capture.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { let _x = box 1i; let lam_move = |&:| {}; diff --git a/src/test/run-pass/unused-move.rs b/src/test/run-pass/unused-move.rs index 883ec44bf2eb4..22201c7d83fef 100644 --- a/src/test/run-pass/unused-move.rs +++ b/src/test/run-pass/unused-move.rs @@ -13,6 +13,8 @@ // Abstract: zero-fill to block after drop #![allow(path_statement)] +#![allow(unknown_features)] +#![feature(box_syntax)] pub fn main() { diff --git a/src/test/run-pass/unwind-unique.rs b/src/test/run-pass/unwind-unique.rs index 554a08ea64460..371fd677bd981 100644 --- a/src/test/run-pass/unwind-unique.rs +++ b/src/test/run-pass/unwind-unique.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + use std::thread::Thread; fn f() { diff --git a/src/test/run-pass/vec-dst.rs b/src/test/run-pass/vec-dst.rs index 4a36231e72b0a..40073c2b74219 100644 --- a/src/test/run-pass/vec-dst.rs +++ b/src/test/run-pass/vec-dst.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unknown_features)] +#![feature(box_syntax)] + pub fn main() { // Tests for indexing into box/& [T; n] let x: [int; 3] = [1, 2, 3]; diff --git a/src/test/run-pass/vector-no-ann-2.rs b/src/test/run-pass/vector-no-ann-2.rs index ba66a448c2509..6391893b9a484 100644 --- a/src/test/run-pass/vector-no-ann-2.rs +++ b/src/test/run-pass/vector-no-ann-2.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - +#![allow(unknown_features)] +#![feature(box_syntax)] pub fn main() { let _quux: Box> = box Vec::new(); }