diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index ac8cf543a423..9a5665e68393 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 b42337a89829..fdc3b52c4d32 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 dc6037c3c0c2..0bb8ba669ec2 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 a3adc09b581c..7692c1558a70 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 036663ad8f56..0d5f6b65827a 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 bd376528a0e5..d19ce3b460ae 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 5525874a6145..e0143917a7cf 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 f3a934857ec2..27e1eaacdfd9 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 961d3a6cfa1e..4a281c413d6f 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 3497ff2221c1..5da51697d2fe 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 d119885f1605..76ac4b2e8af4 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 daa930fddcb8..56f5c23f6f1b 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 d51f070632fd..b3c4cec2ef13 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 316ea65af873..71221a654e8c 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 21d3e4fef7f9..2cfcd38d48fc 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 1823700fbf4f..1efd6a87f863 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 44ae00d997c5..b4f224cb4a7c 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 b6fc6462aa4b..d04308814f85 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 44d001d45fda..8494917c615e 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 af6bb050ef5a..8eb6cd6e2631 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 37022131c3d9..5865a8f467ba 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 eb4d62b01ad1..a28a877a374b 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 bbe5af1b5167..fb58028658e1 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 1d09143c24d1..59ed0e5fa063 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 c872d0dc4b9c..ef2c629acfeb 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 924d70e9f46c..d955e8984bf3 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 2eec78878560..c0abc3a25606 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 a2a5a3e257f2..0351040d329c 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 000000000000..bc7a70471cd8 --- /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 000000000000..b36bc22b9dcc --- /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 47907ac2be9b..8a5e8c27259d 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 d247bf0913c3..92e0dd3ad0e5 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 f10305d017dc..15b3ec0bfe70 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 765aec35fc6a..b2b9dfce0921 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 df3748ac9346..ca7f87ff61ae 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 14af49dfc49c..379397f22bd6 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 f9eecb60c6af..e47fddbdc36f 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 3ff6c733026b..934ddb5f80bb 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 4878ec59fd4b..eab7475bc866 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 e25390a79862..89e47bf46ab0 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 b73c66c4f216..231c57390b30 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 07c9a21c5c11..9f643c09795d 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 6b5aefbab802..f39ded8f98e8 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 ecc1a6a495c1..72a79e188b3d 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 3da245efd79a..089e1b8c5c2a 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 429027cbf304..7365e052171e 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 f13f598fda28..876fc123f480 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 cc4dd13cf61c..f5d5c81117e1 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 856ee686db30..282cf62190ce 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 94da61483eaa..eb44e3b52b90 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 2e9751ce6acf..4bbb17c6dd69 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 7f44bcdb50c1..e026ac9dcbaa 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 c5f69f249db6..325f6dec76f8 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 038f9e5c9ab4..9fcd87418bee 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 33be47e504be..89d80190042c 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 28db3953a002..49483e40096b 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 a6b142bb1265..773780ffb095 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 c586ff2c93ab..4416c57e3456 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 cbfdd5961ffa..7be12ff3cc96 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 d326c20707d9..631133cc7ff8 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 e3e004105076..00673bee8b47 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 262c19174b18..ef5ee5aa3b4a 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 a041bbfe8ad9..e6cae99067e0 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 9c7913dc0b0b..c2fa98a66df9 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 65ad68ba702f..0d155ae085c7 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 89b001020813..83f93cb81a1e 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 59763e417a25..bbfe0e6a18db 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 526819940d00..04ab0d881a84 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 cb495859708b..8eeae7a28ac8 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 375767c8f515..99fdc3460261 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 09f230792a9b..3964d54f8609 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 000000000000..0ff28b471a30 --- /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 d67664bb1be4..0992ee97d061 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 e24bc1dbff9d..3a6973fe61c7 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 0088a36eda9a..1a3e87b55b64 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 d9b0940f80b3..ead0683b8709 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 117b133a1131..b4ee0246d878 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 aea6ebd25975..b00ceb6ed22c 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 b7be14321fde..1a204fa3e206 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 6701a3213393..3b89c943edb1 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 e3927bd53677..f875d0644a07 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 6d7715ed9a5a..7a3b6df539f1 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 c024b6ce8617..9bfb3572ab56 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 0a12df53de23..909f7f4897a6 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 8ef8f1a868d5..ad4456b5b592 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 9c0e5a6f5c89..b2092e745a11 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 0b50609fddfe..627d197879d2 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 56eb340ef59a..269e0ee6ce42 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 96c5f81558e3..e95d58c706b2 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 7d856fd5656c..817136572024 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 87f1adba8ddc..a2aaaa235e42 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 e566f218aa8f..501ba01b4ce1 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 8a67e40844a7..e5d8ec3f8ad0 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 5c1039fe4336..1654c87c6a48 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 3d736cca6d52..e41ce37cc3a1 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 0dff989002f5..d934ce677d12 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 b1fdf51d9b13..5294d05401c8 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 5fc9a502ca8a..9de1379f480f 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 e608f9c46c79..489cd8437d21 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 83f2ada02b0f..7958f4927daf 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 a08cd33362f4..0f8d7c24360f 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 6d06c12c4507..b23d8db3cfdd 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 5eeace650540..9e94bca96f7b 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 8b5dfb6cf75a..34b7f15e4c6b 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 0746c994c2a6..a2f7bdfd8170 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 e1a8ad7c20ab..be83cb04f2c3 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 d0a5af8e2cec..986b35cbecf9 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 b738b5271220..845375d9b840 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 250c5bb66af4..b0d4944ba540 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 4821b9354bfd..1d39c47417c1 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 f83698edc905..0e82ad437829 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 9a43b5b711eb..1d1e744ef080 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 c8d1080372b5..dbc23a63bbad 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 ee82a99a8084..eeae3f35cfcd 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 3b81943000bf..0644fbbc99f4 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 f1bbf353f717..fb04f67e380a 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 fd0ad1ef47ec..883e52b61d08 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 d28950241874..c717053cffc7 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 ab080834ac94..de2b4c51e52a 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 549a70f19e33..194208620a8e 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 92862961acab..f47f1e06011d 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 14c1b1b06eab..6fa450586947 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 a91dbd2b716b..ec929a9c792d 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 b7cd8a901127..75d3c6f334d0 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 c0652b946dbe..3c5ece87b737 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 bb0fe6a87ab0..7e533c2cf86c 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 afc2fc6cf647..d9763baa8265 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 21bda93ecec6..4d05b98147bd 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 03d18cf8c981..6b273b5786a9 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 48fdcb09080a..283ea25b6fe1 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 1febf3374297..75b1e11ddc1e 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 552ce565f6b1..cb6f068cf45b 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 4246fced26c6..175e21888113 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 c5784154a2ec..b50bf442b5d6 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 f68ab01ea9b5..e58fbe0b4c28 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 f61530c74185..6d223923ac1d 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 1f371f0a1c20..7baead6929be 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 e2a03c696f2f..c146f8a7a9af 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 3ac4b874f3ad..1f072af0f5a6 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 3ca3e0592e78..6f5f46edc01c 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 9eec2d048d47..3e4cffe5dfa3 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 74b64bb87cfc..cb376d0e4398 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 cdc41e892f96..295fd538de63 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 aa2ce824822b..de2d4374d787 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 b30c0a117a80..cd71bfce2742 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 72cf2219bb6f..c08bdf544081 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 9e9d611f1a32..c789921f6220 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 139d984b5073..a72b272abaac 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 528870d03347..6647fbe2238e 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 4ebf981e4ee5..12c2155dd57a 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 c3cfaf22dee0..56eb7486c928 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 926b53cf92c0..91c938981c10 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 063b2d703014..5434e44c1737 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 7730d75a3a9c..bf422bd0405a 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 4b5c3566965f..2245e80971a9 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 3b1a8c4a1907..bb79cd4d0466 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 222e1d54a5d9..e53f4c869230 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 589ccefd9ea2..36aa8a9cbca5 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 4010c31eed50..6502c66d8582 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 e979bc86171c..85de03dfe342 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 4b31f3933093..d96862b588f9 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 2b474b8cfbbe..b9f1a8bda7b5 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 7061a17dcdd0..3163f1393280 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 a08bdb09d3da..b6dfbb1ca42a 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 e4f4db6ea63b..2a2ca4f07127 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 5d5240272e54..2ef1c1d264a4 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 369f93222e13..07212237305e 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 fbd6c92a0206..999fb2c4b69f 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 6615bb6368fd..9be9f0982642 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 206d4db3db4f..4a7e844268f6 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 b109e94b74f2..65808de3cf42 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 6bea1aebc458..9ac016d534f0 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 9b20398038d4..e55c1b36f3e2 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 0e7c959d58c3..6883187c402f 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 5c834a06a74d..ebe01a1d1f22 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 0e7e9be6765b..beb125492b2c 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 d4a0d514a7da..e9a1e19d4bf8 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 b94f1ae6ba64..7fa810ce1549 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 29d100beb064..39018a873942 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 788a25efcf98..ae15bc60746b 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 cae783e7ea84..b18c29dc3c13 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 2da6076d1386..018cd440cad3 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 65d8281407c4..50187ef8baad 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 04540c2f35b2..6561a9b2d5b5 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 2820e0d71205..a10e3f9f5b0d 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 286781a48227..9e5eeef75527 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 5e5d01ae6ee4..c902677c6453 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 29fd070fc19d..e496e9e21053 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 0f3d0baecbe5..fdb6799b90f7 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 f80728519136..388b814b2af1 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 991d0ecdc87a..4ea51b3b409a 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 8531fd5f975a..1f2207ad8737 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 d74f1349506c..130cdc85b013 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 43a6ac296e9d..0952bedd6e30 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 0293c4e36ac5..bb62b1599a4f 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 4964b3f67284..ebdf3c08a226 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 ab3d39e27337..cd97c34f8c6a 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 14ddc5d660f0..d355999c5060 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 8a10cc8c1ef4..fb87cd5eb69c 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 949a7b158d41..5831d500b839 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 1251394a549d..a2cc7b7dfea5 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 bc67c0afc7b5..637d2c946944 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 498b81d307e2..e784318fc762 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 3b2897cf3a6f..7fbdd2f219e1 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 8ad2dbc1acb7..84a230fd5767 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 9a758c5d8ada..ba86e3f7b57b 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 36f7d88f7d79..30a22512d2a7 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 5dba80ad38a1..3922cb1219c0 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 a7724e68310a..0152793d96c6 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 41396ef01bee..e38a472fa4c8 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 907f610ff25d..3267ff2c7e0e 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 5b0b7cc5b4ef..9637c43170f6 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 e9f774150dcf..faa9b37bdcc6 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 1ecaf41702e0..f397b5124caf 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 d3dbca53f605..708d031a68a6 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 c796566b79d5..c4852c9162ca 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 6eb981046163..e779e002b299 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 0f36dc045754..abd5789bb1f7 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 95f90ebbf8ed..28d47f7aa9be 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 74416b96e936..40a4dc52a70b 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 bced8012b683..e934498ea050 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 75fb98f8e24f..3092898d9865 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 a6e4716c3b8a..89624c3ac16a 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 e0d005a485bc..fc0b501e9c52 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 b2bcf395783a..ca2a8cf5506e 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 7ff5960375cb..5e6247bac93f 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 bc397bb63196..0089646d0a14 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 7d924f977cbe..22db6c64770e 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 37d69ddfe076..0d4a05bed7f5 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 e06e01b9e051..19d76b889011 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 81aa5daaf91c..76352c799a0f 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 a94f73c2b6da..7e2b7ae0663b 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 7265ddf66150..3fcb04d6848e 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 63a59b6f750e..20a28c5a9ead 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 431a9383b3bd..aa290edd8631 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 b6b9fb67f905..968f3511247c 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 60e59400e1a0..dc35d5bf2cac 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 8909f4e261fa..da647e90c00f 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 2dec53cc13af..8ee3c96f580d 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 52855f826731..6701f879e4f2 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 d1bd7e908c82..915715727e8e 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 4d7830e1cdca..b7980ed9021e 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 fb5f6e4a8aa1..9e3d9544d427 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 505e9b46e03c..81c4b6ab7e51 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 493ec8ddc207..7c9bbd641717 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 64d65a7b2e52..199657fd995d 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 67f96decaa9d..aab7f4108fba 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 f9bd5114e7da..1c7b4c534ed8 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 38be635d8372..dba4d8db8496 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 ccb21b605c19..e4099c94c2f1 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 acd405e2659a..cec74d251b30 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 ddc2bb6c30f1..d0ad03b773c3 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 1d98cfb6b4bf..d7c19eb63588 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 e2e7b2ec771a..0acdc8f3b802 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 37ca58913ab3..752ea830aa5d 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 0b3041f2249e..3213146cbf4a 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 a4b6ff5accff..ec2c9f8c6661 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 68290d85d0e6..0e47d39e55f5 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 ccf6a4fd7aea..e1d148cc9a55 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 6769011cffef..301994a74a85 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 8493652cf8a0..de2c265089be 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 ffff9b98f54e..4f02018346bd 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 577a8f1430b2..4620815e74e9 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 0f8527664b92..389ca2c18b1b 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 6e58ec23a3b0..b36d08364a2f 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 d3f4a8b10901..56f7a3f7990e 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 bae87230ba05..05579796dab9 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 68b46db3a947..a1502c2eb8c0 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 1b6ef92865c9..1388c6c5d2ba 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 1902fabe6399..af82d3e14eae 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 398db63ce080..791c4799bf07 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 eebb17055901..c4f860d930b8 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 6d0432faf551..cec523a06712 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 bf99f06f58ab..eab775fc1db4 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 559d8f8cb3ca..42a4b1a9c0cb 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 a0eee7e3cb6e..ee975b9c81a0 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 ff7f009990da..756911d29fc8 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 ba75c7629b51..90f4b2e63444 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 afafb204c1c9..137285854555 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 d467d042e4e4..cd3b59a69bab 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 c7e8b2a05ec5..285100dd7197 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 271f5817c9e7..983152cd056d 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 bd20a174d1e4..27945f469205 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 883ec44bf2eb..22201c7d83fe 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 554a08ea6446..371fd677bd98 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 4a36231e72b0..40073c2b7421 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 ba66a448c250..6391893b9a48 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(); }