From 82af2a1847fd51dd82f38666283ec9ff174d7a74 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 7 Jan 2015 01:10:50 +0100 Subject: [PATCH 01/15] Add `Box::new` method. Prereq for feature-gating `box ` itself. --- src/liballoc/boxed.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index d46f18abf97..cec49fa6186 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] From 4a31aaddb364f5ab8280242a1016bdd3d10dcaed Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 7 Jan 2015 15:15:34 +0100 Subject: [PATCH 02/15] Added `box_syntax` feature gate; added to std and rustc crates for bootstrap. To avoid using the feauture, change uses of `box ` to `Box::new()` alternative, as noted by the feature gate message. (Note that box patterns have no analogous trivial replacement, at least not in general; you need to revise the code to do a partial match, deref, and then the rest of the match.) [breaking-change] --- src/liballoc/lib.rs | 1 + src/libcollections/lib.rs | 1 + src/liblog/lib.rs | 1 + src/libregex/lib.rs | 1 + src/librustc/lib.rs | 1 + src/librustc_trans/lib.rs | 1 + src/librustc_typeck/lib.rs | 1 + src/librustdoc/lib.rs | 1 + src/libserialize/lib.rs | 1 + src/libstd/lib.rs | 1 + src/libsyntax/feature_gate.rs | 12 ++++++++++++ src/libsyntax/lib.rs | 1 + src/libterm/lib.rs | 1 + src/libtest/lib.rs | 1 + 14 files changed, 25 insertions(+) diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index ba6e89cdd76..402a542a92b 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -66,6 +66,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 6eab36d8844..37bc37b84df 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -24,6 +24,7 @@ #![allow(unknown_features)] #![feature(unsafe_destructor, slicing_syntax)] #![feature(old_impl_check)] +#![feature(box_syntax)] #![feature(unboxed_closures)] #![no_std] diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index 08b01e956e1..ca61e3d1655 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -164,6 +164,7 @@ html_root_url = "http://doc.rust-lang.org/nightly/", html_playground_url = "http://play.rust-lang.org/")] #![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 c039abc9aff..bd93816a26d 100644 --- a/src/libregex/lib.rs +++ b/src/libregex/lib.rs @@ -24,6 +24,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 a3a041c2497..7b57544d9d1 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -25,6 +25,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_trans/lib.rs b/src/librustc_trans/lib.rs index b6f90a4c2f5..e5f8334049b 100644 --- a/src/librustc_trans/lib.rs +++ b/src/librustc_trans/lib.rs @@ -24,6 +24,7 @@ #![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 ae8731dfa47..950b3e4da86 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -73,6 +73,7 @@ This API is completely unstable and subject to change. #![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 ee65ef06623..d71dd00dc85 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -17,6 +17,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 139170fc012..39a6471aac6 100644 --- a/src/libserialize/lib.rs +++ b/src/libserialize/lib.rs @@ -24,6 +24,7 @@ Core encoding and decoding interfaces. html_playground_url = "http://play.rust-lang.org/")] #![allow(unknown_features)] #![feature(slicing_syntax)] +#![feature(box_syntax)] #![feature(old_impl_check)] #![cfg_attr(stage0, allow(unused_attributes))] diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index eef5bdb60ee..d34f497bbea 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -107,6 +107,7 @@ #![feature(linkage, thread_local, asm)] #![feature(lang_items, unsafe_destructor)] #![feature(slicing_syntax, unboxed_closures)] +#![feature(box_syntax)] #![feature(old_impl_check)] #![cfg_attr(stage0, allow(unused_attributes))] diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index f10113254de..fbff5e16ef5 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -70,6 +70,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[ ("associated_types", Accepted), ("visible_private_types", Active), ("slicing_syntax", Active), + ("box_syntax", Active), ("if_let", Accepted), ("while_let", Accepted), @@ -343,6 +344,12 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> { e.span, "range syntax is experimental"); } + 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); @@ -365,6 +372,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 9e14f9dd1ea..b6516254dbf 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -24,6 +24,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 c953f591d80..8f486ea8c02 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -49,6 +49,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 68d06cc4dab..506a625beb6 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -31,6 +31,7 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/")] #![feature(asm, slicing_syntax)] +#![feature(box_syntax)] extern crate getopts; extern crate regex; From cfeab2593bc75b114a1bff6615b516e84f0fe47c Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 7 Jan 2015 18:25:18 +0100 Subject: [PATCH 03/15] Allow unknown features to bootstrap rustc with box_syntax feature. Specifically added to the test, librustc_trans, librustc_typeck crates. --- src/librustc_trans/lib.rs | 1 + src/librustc_typeck/lib.rs | 1 + src/libtest/lib.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs index e5f8334049b..e667c0c2a1c 100644 --- a/src/librustc_trans/lib.rs +++ b/src/librustc_trans/lib.rs @@ -22,6 +22,7 @@ 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)] diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index 950b3e4da86..e8dddb49ee4 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -71,6 +71,7 @@ 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)] diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 506a625beb6..f39cbcb9242 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -30,6 +30,7 @@ #![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)] From ef5e8fc1381dc4d3d74e9f933c836c320f450d80 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 7 Jan 2015 20:32:25 +0100 Subject: [PATCH 04/15] run-pass tests: Add feature attributes to enable box pat/expr syntax in various tests. --- src/test/run-pass/borrowck-macro-interaction-issue-6304.rs | 1 + src/test/run-pass/cleanup-rvalue-scopes.rs | 2 ++ src/test/run-pass/coerce-match.rs | 2 ++ src/test/run-pass/func-arg-ref-pattern.rs | 1 + src/test/run-pass/issue-11552.rs | 1 + src/test/run-pass/issue-16774.rs | 1 + src/test/run-pass/issue-6557.rs | 1 + src/test/run-pass/match-unique-bind.rs | 2 ++ src/test/run-pass/new-box-syntax.rs | 2 ++ src/test/run-pass/regions-dependent-addr-of.rs | 1 + src/test/run-pass/unique-destructure.rs | 2 ++ src/test/run-pass/unique-pat-2.rs | 1 + src/test/run-pass/unique-pat.rs | 2 ++ 13 files changed, 19 insertions(+) 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 28db3953a00..49483e40096 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/cleanup-rvalue-scopes.rs b/src/test/run-pass/cleanup-rvalue-scopes.rs index 59763e417a2..bbfe0e6a18d 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/coerce-match.rs b/src/test/run-pass/coerce-match.rs index d67664bb1be..8c2123a53f5 100644 --- a/src/test/run-pass/coerce-match.rs +++ b/src/test/run-pass/coerce-match.rs @@ -10,6 +10,8 @@ // Check that coercions are propagated through match and if expressions. +#![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/func-arg-ref-pattern.rs b/src/test/run-pass/func-arg-ref-pattern.rs index 5eeace65054..97b13694872 100644 --- a/src/test/run-pass/func-arg-ref-pattern.rs +++ b/src/test/run-pass/func-arg-ref-pattern.rs @@ -14,6 +14,7 @@ // boxes. Make sure that we don't free the box as we match the // pattern. +#![feature(box_syntax)] fn getaddr(box ref x: Box) -> *const uint { let addr: *const uint = &*x; diff --git a/src/test/run-pass/issue-11552.rs b/src/test/run-pass/issue-11552.rs index 92862961aca..ceceb839ed6 100644 --- a/src/test/run-pass/issue-11552.rs +++ b/src/test/run-pass/issue-11552.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] #[derive(Clone)] enum Noun diff --git a/src/test/run-pass/issue-16774.rs b/src/test/run-pass/issue-16774.rs index 6ef4f868d21..5cdab2d8c44 100644 --- a/src/test/run-pass/issue-16774.rs +++ b/src/test/run-pass/issue-16774.rs @@ -9,6 +9,7 @@ // except according to those terms. #![feature(unboxed_closures)] +#![feature(box_syntax)] use std::ops::{Deref, DerefMut}; diff --git a/src/test/run-pass/issue-6557.rs b/src/test/run-pass/issue-6557.rs index 7061a17dcdd..93bbdea3af7 100644 --- a/src/test/run-pass/issue-6557.rs +++ b/src/test/run-pass/issue-6557.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] fn foo(box (_x, _y): Box<(int, int)>) {} diff --git a/src/test/run-pass/match-unique-bind.rs b/src/test/run-pass/match-unique-bind.rs index 5c834a06a74..95b75153d4a 100644 --- a/src/test/run-pass/match-unique-bind.rs +++ b/src/test/run-pass/match-unique-bind.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + pub fn main() { match box 100i { box x => { diff --git a/src/test/run-pass/new-box-syntax.rs b/src/test/run-pass/new-box-syntax.rs index 991d0ecdc87..fadb89651ca 100644 --- a/src/test/run-pass/new-box-syntax.rs +++ b/src/test/run-pass/new-box-syntax.rs @@ -11,6 +11,8 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ +#![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/regions-dependent-addr-of.rs b/src/test/run-pass/regions-dependent-addr-of.rs index 41396ef01be..4595fb13b07 100644 --- a/src/test/run-pass/regions-dependent-addr-of.rs +++ b/src/test/run-pass/regions-dependent-addr-of.rs @@ -11,6 +11,7 @@ // Test lifetimes are linked properly when we create dependent region pointers. // Issue #3148. +#![feature(box_syntax)] struct A { value: B diff --git a/src/test/run-pass/unique-destructure.rs b/src/test/run-pass/unique-destructure.rs index 0b3041f2249..b19fa60518b 100644 --- a/src/test/run-pass/unique-destructure.rs +++ b/src/test/run-pass/unique-destructure.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + struct Foo { a: int, b: int } pub fn main() { diff --git a/src/test/run-pass/unique-pat-2.rs b/src/test/run-pass/unique-pat-2.rs index bf99f06f58a..c020fb9183f 100644 --- a/src/test/run-pass/unique-pat-2.rs +++ b/src/test/run-pass/unique-pat-2.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] struct Foo {a: int, b: uint} diff --git a/src/test/run-pass/unique-pat.rs b/src/test/run-pass/unique-pat.rs index a0eee7e3cb6..10ce34961cf 100644 --- a/src/test/run-pass/unique-pat.rs +++ b/src/test/run-pass/unique-pat.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + fn simple() { match box true { box true => { } From e3181256d4d2d98b5f4c6730fe5c34acc8881c8d Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 7 Jan 2015 22:35:56 +0100 Subject: [PATCH 05/15] compile-fail tests: Add feature attributes to enable box pat/expr syntax in various tests. --- src/test/compile-fail/borrowck-loan-in-overloaded-op.rs | 2 ++ src/test/compile-fail/borrowck-vec-pattern-nesting.rs | 1 + src/test/compile-fail/destructure-trait-ref.rs | 2 ++ src/test/compile-fail/issue-12116.rs | 2 ++ src/test/compile-fail/issue-14084.rs | 2 ++ src/test/compile-fail/issue-3601.rs | 1 + src/test/compile-fail/issue-4972.rs | 1 + src/test/compile-fail/issue-5100.rs | 2 ++ src/test/compile-fail/moves-based-on-type-block-bad.rs | 2 ++ src/test/compile-fail/regions-ref-in-fn-arg.rs | 1 + src/test/compile-fail/unreachable-arm.rs | 1 + 11 files changed, 17 insertions(+) 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 924d70e9f46..d955e8984bf 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 2eec7887856..c0abc3a2560 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 a2a5a3e257f..0351040d329 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/issue-12116.rs b/src/test/compile-fail/issue-12116.rs index 47907ac2be9..8a5e8c27259 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 d247bf0913c..92e0dd3ad0e 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 f10305d017d..15b3ec0bfe7 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 765aec35fc6..b2b9dfce092 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 df3748ac934..ca7f87ff61a 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 14af49dfc49..379397f22bd 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 f9eecb60c6a..e47fddbdc36 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 3ff6c733026..934ddb5f80b 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), } From c52486df313c6971f908fbdc48420eb1ed23f8f1 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 7 Jan 2015 22:22:11 +0100 Subject: [PATCH 06/15] alternate version of coerce-match test that avoids box syntax. --- src/test/run-pass/coerce-match-calls.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/test/run-pass/coerce-match-calls.rs 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 00000000000..0ff28b471a3 --- /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; +} From b57b0e0f3a49a81c23f7af6cbd72a67fdf6b9574 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 7 Jan 2015 23:03:22 +0100 Subject: [PATCH 07/15] Test that box syntax, both in expressions and patterns, is caught by feature gate net. fix typo in my feature-gate-box-expr.rs test. --- .../compile-fail/feature-gate-box-expr.rs | 23 +++++++++++++++++++ src/test/compile-fail/feature-gate-box-pat.rs | 14 +++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/test/compile-fail/feature-gate-box-expr.rs create mode 100644 src/test/compile-fail/feature-gate-box-pat.rs 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 00000000000..bc7a70471cd --- /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 00000000000..b36bc22b9dc --- /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); +} From 3fd6bfa8f7a1d193316956b5be8818c47bb874b7 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 7 Jan 2015 23:04:12 +0100 Subject: [PATCH 08/15] Switch to using `Box::new` in the tests in `alloc::boxed`. --- src/liballoc/boxed.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index cec49fa6186..f3ce50ec051 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -186,27 +186,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 +214,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 +232,6 @@ mod test { #[test] fn deref() { fn homura>(_: T) { } - homura(box 765i32); + homura(Box::new(765i32)); } } From 3010e10d1d72baa166dffbc58b02c40c2470003d Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 8 Jan 2015 00:38:47 +0100 Subject: [PATCH 09/15] allow unknown features in the log crate. --- src/liblog/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index ca61e3d1655..47cfb73fb71 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -163,6 +163,8 @@ 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)] From 772cfe9da5966c837da39edde315bcef032591ce Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 8 Jan 2015 01:03:46 +0100 Subject: [PATCH 10/15] allow box_syntax and unknown features in the rustc_llvm crate. --- src/librustc_llvm/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index 0bed754aa3c..480c6d88cbc 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -21,7 +21,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; From 5bd88a0ddedd7cac51d9fe78655a17e74ab125e5 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 8 Jan 2015 01:17:21 +0100 Subject: [PATCH 11/15] allow box_syntax and unknown features in the rustc_driver crate. --- src/librustc_driver/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 5af114abeea..0106cbbe0cf 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -22,8 +22,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; From bfd6f958c465f729d2a0ad3dabf34ad04e6b3571 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 8 Jan 2015 01:43:32 +0100 Subject: [PATCH 12/15] allow box_syntax and unknown features in compiletest driver. --- src/compiletest/compiletest.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index e2420b0a220..9a5665e6839 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -9,7 +9,9 @@ // except according to those terms. #![crate_type = "bin"] +#![allow(unknown_features)] #![feature(slicing_syntax, unboxed_closures)] +#![feature(box_syntax)] #![deny(warnings)] From a7a2dd96ecc62221f78013abb3269591f4d07f04 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 8 Jan 2015 02:25:56 +0100 Subject: [PATCH 13/15] fallout: run-pass tests that use box. (many could be ported to `Box::new` instead in the future.) --- src/test/auxiliary/cci_nested_lib.rs | 2 ++ src/test/auxiliary/issue-2380.rs | 2 ++ src/test/auxiliary/method_self_arg1.rs | 3 +++ src/test/auxiliary/method_self_arg2.rs | 3 +++ src/test/run-pass/alignment-gep-tup-like-1.rs | 3 +++ src/test/run-pass/assert-eq-macro-success.rs | 2 ++ .../run-pass/associated-type-doubleendediterator-object.rs | 3 +++ src/test/run-pass/autoderef-method-on-trait.rs | 2 ++ src/test/run-pass/autoderef-method-priority.rs | 2 ++ src/test/run-pass/autoderef-method-twice-but-not-thrice.rs | 2 ++ src/test/run-pass/autoderef-method-twice.rs | 3 +++ src/test/run-pass/autoderef-method.rs | 3 +++ src/test/run-pass/autoref-intermediate-types-issue-3585.rs | 3 +++ src/test/run-pass/bitv-perf-test.rs | 3 +++ src/test/run-pass/borrowck-borrow-from-expr-block.rs | 2 ++ src/test/run-pass/borrowck-field-sensitivity.rs | 3 +++ src/test/run-pass/borrowck-move-by-capture-ok.rs | 2 ++ src/test/run-pass/borrowck-mut-uniq.rs | 3 +++ src/test/run-pass/borrowck-use-mut-borrow.rs | 3 +++ src/test/run-pass/cancel-clean-via-immediate-rvalue-ref.rs | 2 ++ src/test/run-pass/capturing-logging.rs | 3 +++ src/test/run-pass/cci_borrow.rs | 2 ++ src/test/run-pass/class-cast-to-trait-cross-crate-2.rs | 4 ++++ src/test/run-pass/class-separate-impl.rs | 3 +++ src/test/run-pass/cleanup-arm-conditional.rs | 3 +++ src/test/run-pass/cleanup-rvalue-during-if-and-while.rs | 2 ++ .../run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs | 3 +++ src/test/run-pass/clone-with-exterior.rs | 3 +++ src/test/run-pass/close-over-big-then-small-data.rs | 3 +++ src/test/run-pass/coerce-expect-unsized.rs | 3 +++ src/test/run-pass/coerce-match.rs | 1 + src/test/run-pass/const-bound.rs | 2 ++ src/test/run-pass/crate-method-reexport-grrrrrrr.rs | 2 ++ src/test/run-pass/deref-lval.rs | 2 ++ src/test/run-pass/deref.rs | 2 ++ src/test/run-pass/deriving-default-box.rs | 3 +++ src/test/run-pass/deriving-encodable-decodable-box.rs | 2 ++ src/test/run-pass/deriving-eq-ord-boxed-slice.rs | 3 +++ src/test/run-pass/drop-on-empty-block-exit.rs | 2 ++ src/test/run-pass/drop-struct-as-object.rs | 3 +++ src/test/run-pass/drop-trait-enum.rs | 3 +++ src/test/run-pass/dst-deref-mut.rs | 3 +++ src/test/run-pass/dst-deref.rs | 3 +++ src/test/run-pass/dst-struct.rs | 3 +++ src/test/run-pass/dst-trait.rs | 3 +++ src/test/run-pass/empty-allocation-non-null.rs | 3 +++ src/test/run-pass/empty-allocation-rvalue-non-null.rs | 3 +++ src/test/run-pass/enum-nullable-simplifycfg-misopt.rs | 2 ++ src/test/run-pass/explicit-self-generic.rs | 3 +++ src/test/run-pass/explicit-self-objects-uniq.rs | 2 ++ src/test/run-pass/explicit-self.rs | 3 +++ src/test/run-pass/expr-block-generic-unique1.rs | 3 +++ src/test/run-pass/expr-block-generic-unique2.rs | 3 +++ src/test/run-pass/expr-block-unique.rs | 3 ++- src/test/run-pass/expr-if-unique.rs | 3 ++- src/test/run-pass/expr-match-generic-unique1.rs | 3 +++ src/test/run-pass/expr-match-generic-unique2.rs | 3 +++ src/test/run-pass/expr-match-unique.rs | 2 ++ src/test/run-pass/fsu-moves-and-copies.rs | 3 +++ src/test/run-pass/func-arg-incomplete-pattern.rs | 2 ++ src/test/run-pass/func-arg-ref-pattern.rs | 1 + src/test/run-pass/generic-alias-unique.rs | 3 +++ src/test/run-pass/generic-exterior-unique.rs | 2 ++ src/test/run-pass/generic-fn-unique.rs | 3 +++ src/test/run-pass/generic-object.rs | 2 ++ src/test/run-pass/generic-recursive-tag.rs | 2 ++ src/test/run-pass/generic-tag.rs | 2 ++ src/test/run-pass/generic-unique.rs | 2 ++ src/test/run-pass/hashmap-memory.rs | 2 ++ src/test/run-pass/hrtb-precedence-of-plus.rs | 2 ++ src/test/run-pass/ifmt.rs | 2 ++ src/test/run-pass/init-res-into-things.rs | 2 ++ src/test/run-pass/intrinsic-atomics.rs | 2 ++ src/test/run-pass/intrinsic-move-val.rs | 2 ++ src/test/run-pass/issue-10682.rs | 3 +++ src/test/run-pass/issue-10767.rs | 2 ++ src/test/run-pass/issue-10802.rs | 3 +++ src/test/run-pass/issue-11205.rs | 2 ++ src/test/run-pass/issue-11552.rs | 1 + src/test/run-pass/issue-11677.rs | 2 ++ src/test/run-pass/issue-12744.rs | 3 +++ src/test/run-pass/issue-13323.rs | 3 +++ src/test/run-pass/issue-13808.rs | 3 +++ src/test/run-pass/issue-14399.rs | 3 +++ src/test/run-pass/issue-14589.rs | 3 +++ src/test/run-pass/issue-14919.rs | 3 +++ src/test/run-pass/issue-15571.rs | 3 +++ src/test/run-pass/issue-15763.rs | 2 ++ src/test/run-pass/issue-16668.rs | 2 ++ src/test/run-pass/issue-16739.rs | 2 ++ src/test/run-pass/issue-16774.rs | 3 ++- src/test/run-pass/issue-17322.rs | 3 +++ src/test/run-pass/issue-17734.rs | 3 +++ src/test/run-pass/issue-18425.rs | 3 +++ src/test/run-pass/issue-2288.rs | 2 ++ src/test/run-pass/issue-2633-2.rs | 3 +++ src/test/run-pass/issue-2708.rs | 2 ++ src/test/run-pass/issue-2718.rs | 2 ++ src/test/run-pass/issue-2734.rs | 2 ++ src/test/run-pass/issue-2735.rs | 2 ++ src/test/run-pass/issue-2935.rs | 2 ++ src/test/run-pass/issue-3012-2.rs | 2 ++ src/test/run-pass/issue-3026.rs | 3 +++ src/test/run-pass/issue-3052.rs | 2 ++ src/test/run-pass/issue-3121.rs | 2 ++ src/test/run-pass/issue-3290.rs | 3 +++ src/test/run-pass/issue-3424.rs | 2 ++ src/test/run-pass/issue-3447.rs | 2 ++ src/test/run-pass/issue-3609.rs | 3 +++ src/test/run-pass/issue-3794.rs | 3 +++ src/test/run-pass/issue-3878.rs | 2 ++ src/test/run-pass/issue-4735.rs | 3 +++ src/test/run-pass/issue-4759.rs | 2 ++ src/test/run-pass/issue-5192.rs | 2 ++ src/test/run-pass/issue-5666.rs | 2 ++ src/test/run-pass/issue-5718.rs | 3 +++ src/test/run-pass/issue-5884.rs | 2 ++ src/test/run-pass/issue-6117.rs | 2 ++ src/test/run-pass/issue-6128.rs | 3 +++ src/test/run-pass/issue-6318.rs | 2 ++ src/test/run-pass/issue-6557.rs | 1 + .../run-pass/issue-7673-cast-generically-implemented-trait.rs | 2 ++ src/test/run-pass/issue-8498.rs | 3 +++ src/test/run-pass/issue-9129.rs | 2 ++ src/test/run-pass/issue-9382.rs | 2 ++ src/test/run-pass/kindck-owned-trait-contains-1.rs | 2 ++ src/test/run-pass/last-use-in-cap-clause.rs | 2 ++ src/test/run-pass/last-use-is-capture.rs | 3 +++ src/test/run-pass/leak-unique-as-tydesc.rs | 2 ++ src/test/run-pass/let-assignability.rs | 3 +++ src/test/run-pass/list.rs | 2 ++ src/test/run-pass/match-implicit-copy-unique.rs | 2 ++ src/test/run-pass/match-unique-bind.rs | 1 + src/test/run-pass/match-value-binding-in-guard-3291.rs | 2 ++ src/test/run-pass/method-self-arg-aux1.rs | 3 +++ src/test/run-pass/method-self-arg-aux2.rs | 3 +++ src/test/run-pass/method-self-arg-trait.rs | 3 +++ src/test/run-pass/method-self-arg.rs | 3 +++ src/test/run-pass/method-two-trait-defer-resolution-2.rs | 3 +++ src/test/run-pass/move-1-unique.rs | 2 ++ src/test/run-pass/move-2-unique.rs | 2 ++ src/test/run-pass/move-2.rs | 2 ++ src/test/run-pass/move-3-unique.rs | 2 ++ src/test/run-pass/move-4-unique.rs | 2 ++ src/test/run-pass/move-4.rs | 2 ++ src/test/run-pass/move-arg-2-unique.rs | 2 ++ src/test/run-pass/move-arg-2.rs | 2 ++ src/test/run-pass/mut-function-arguments.rs | 2 ++ src/test/run-pass/new-box-syntax.rs | 1 + src/test/run-pass/new-box.rs | 2 ++ src/test/run-pass/newlambdas-ret-infer.rs | 3 +++ src/test/run-pass/newlambdas-ret-infer2.rs | 3 +++ src/test/run-pass/nullable-pointer-iotareduction.rs | 3 +++ src/test/run-pass/object-one-type-two-traits.rs | 3 +++ .../objects-owned-object-borrowed-method-headerless.rs | 3 +++ src/test/run-pass/objects-owned-object-owned-method.rs | 2 ++ src/test/run-pass/output-slot-variants.rs | 2 ++ src/test/run-pass/overloaded-autoderef.rs | 3 +++ src/test/run-pass/overloaded-deref.rs | 3 +++ src/test/run-pass/overloaded-index-autoderef.rs | 3 +++ src/test/run-pass/owned-implies-static.rs | 3 +++ src/test/run-pass/pure-sum.rs | 2 ++ src/test/run-pass/rcvr-borrowed-to-region.rs | 2 ++ src/test/run-pass/regions-borrow-at.rs | 2 ++ src/test/run-pass/regions-borrow-uniq.rs | 3 +++ .../regions-close-over-type-parameter-successfully.rs | 3 +++ src/test/run-pass/regions-copy-closure.rs | 2 ++ src/test/run-pass/regions-dependent-addr-of.rs | 1 + src/test/run-pass/regions-early-bound-trait-param.rs | 2 ++ src/test/run-pass/regions-escape-into-other-fn.rs | 2 ++ src/test/run-pass/regions-fn-subtyping.rs | 2 ++ .../run-pass/regions-infer-borrow-scope-within-loop-ok.rs | 3 +++ src/test/run-pass/regions-infer-borrow-scope.rs | 2 ++ src/test/run-pass/regions-lifetime-nonfree-late-bound.rs | 3 +++ ...relate-bound-regions-on-closures-to-inference-variables.rs | 3 +++ src/test/run-pass/regions-static-closure.rs | 2 ++ src/test/run-pass/rust-log-filter.rs | 3 +++ src/test/run-pass/self-impl.rs | 3 +++ src/test/run-pass/self-in-mut-slot-default-method.rs | 2 ++ src/test/run-pass/self-re-assign.rs | 3 +++ src/test/run-pass/sendfn-spawn-with-fn-arg.rs | 3 +++ src/test/run-pass/show-boxed-slice.rs | 3 +++ src/test/run-pass/task-spawn-move-and-copy.rs | 3 +++ src/test/run-pass/task-stderr.rs | 3 +++ src/test/run-pass/trait-bounds-in-arc.rs | 2 ++ src/test/run-pass/trait-coercion-generic.rs | 2 ++ src/test/run-pass/trait-coercion.rs | 3 +++ src/test/run-pass/trait-contravariant-self.rs | 3 +++ src/test/run-pass/trait-object-generics.rs | 2 ++ src/test/run-pass/traits-conditional-dispatch.rs | 3 +++ src/test/run-pass/type-param-constraints.rs | 2 ++ src/test/run-pass/typeclasses-eq-example-static.rs | 3 +++ src/test/run-pass/typeclasses-eq-example.rs | 2 ++ src/test/run-pass/ufcs-explicit-self.rs | 3 +++ src/test/run-pass/unboxed-closures-boxed.rs | 2 ++ .../run-pass/unboxed-closures-call-sugar-object-autoderef.rs | 2 ++ src/test/run-pass/unboxed-closures-call-sugar-object.rs | 2 ++ src/test/run-pass/unboxed-closures-monomorphization.rs | 2 ++ src/test/run-pass/unboxed-closures-prelude.rs | 2 ++ src/test/run-pass/uniq-self-in-mut-slot.rs | 2 ++ src/test/run-pass/unique-assign-copy.rs | 3 +++ src/test/run-pass/unique-assign-drop.rs | 2 ++ src/test/run-pass/unique-assign-generic.rs | 3 +++ src/test/run-pass/unique-assign.rs | 3 +++ src/test/run-pass/unique-autoderef-field.rs | 3 +++ src/test/run-pass/unique-autoderef-index.rs | 2 ++ src/test/run-pass/unique-cmp.rs | 3 +++ src/test/run-pass/unique-containing-tag.rs | 3 +++ src/test/run-pass/unique-create.rs | 3 +++ src/test/run-pass/unique-decl-init-copy.rs | 3 +++ src/test/run-pass/unique-decl-init.rs | 3 +++ src/test/run-pass/unique-decl-move.rs | 3 +++ src/test/run-pass/unique-deref.rs | 3 +++ src/test/run-pass/unique-destructure.rs | 1 + src/test/run-pass/unique-drop-complex.rs | 3 +++ src/test/run-pass/unique-fn-arg-move.rs | 3 +++ src/test/run-pass/unique-fn-arg-mut.rs | 2 ++ src/test/run-pass/unique-fn-arg.rs | 2 ++ src/test/run-pass/unique-fn-ret.rs | 2 ++ src/test/run-pass/unique-in-tag.rs | 3 +++ src/test/run-pass/unique-in-vec-copy.rs | 2 ++ src/test/run-pass/unique-in-vec.rs | 3 +++ src/test/run-pass/unique-init.rs | 3 +++ src/test/run-pass/unique-kinds.rs | 3 +++ src/test/run-pass/unique-log.rs | 3 +++ src/test/run-pass/unique-match-discrim.rs | 3 +++ src/test/run-pass/unique-move-drop.rs | 2 ++ src/test/run-pass/unique-move-temp.rs | 3 +++ src/test/run-pass/unique-move.rs | 3 +++ src/test/run-pass/unique-mutable.rs | 3 +++ src/test/run-pass/unique-object-move.rs | 2 ++ src/test/run-pass/unique-pat-2.rs | 1 + src/test/run-pass/unique-pat-3.rs | 3 +++ src/test/run-pass/unique-pat.rs | 1 + src/test/run-pass/unique-rec.rs | 3 +++ src/test/run-pass/unique-send-2.rs | 3 +++ src/test/run-pass/unique-send.rs | 3 +++ src/test/run-pass/unique-swap.rs | 3 +++ src/test/run-pass/unsized2.rs | 3 +++ src/test/run-pass/unsized3.rs | 3 +++ src/test/run-pass/unused-move-capture.rs | 3 +++ src/test/run-pass/unused-move.rs | 2 ++ src/test/run-pass/unwind-unique.rs | 3 +++ src/test/run-pass/vec-dst.rs | 3 +++ src/test/run-pass/vector-no-ann-2.rs | 3 ++- 245 files changed, 605 insertions(+), 4 deletions(-) diff --git a/src/test/auxiliary/cci_nested_lib.rs b/src/test/auxiliary/cci_nested_lib.rs index 44d001d45fd..8494917c615 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 af6bb050ef5..8eb6cd6e263 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 37022131c3d..5865a8f467b 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 eb4d62b01ad..a28a877a374 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/run-pass/alignment-gep-tup-like-1.rs b/src/test/run-pass/alignment-gep-tup-like-1.rs index ecc1a6a495c..72a79e188b3 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 3da245efd79..089e1b8c5c2 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 429027cbf30..7365e052171 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 f13f598fda2..876fc123f48 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 cc4dd13cf61..f5d5c81117e 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 856ee686db3..282cf62190c 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 94da61483ea..eb44e3b52b9 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 2e9751ce6ac..4bbb17c6dd6 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 7f44bcdb50c..e026ac9dcba 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 c5f69f249db..325f6dec76f 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 038f9e5c9ab..9fcd87418be 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 33be47e504b..89d80190042 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-move-by-capture-ok.rs b/src/test/run-pass/borrowck-move-by-capture-ok.rs index a6b142bb126..773780ffb09 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 c586ff2c93a..4416c57e345 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 cbfdd5961ff..7be12ff3cc9 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 d326c20707d..631133cc7ff 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 e3e00410507..00673bee8b4 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 262c19174b1..ef5ee5aa3b4 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 a041bbfe8ad..e6cae99067e 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 9c7913dc0b0..c2fa98a66df 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 65ad68ba702..0d155ae085c 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 89b00102081..83f93cb81a1 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-temp-during-incomplete-alloc.rs b/src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs index 526819940d0..04ab0d881a8 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 cb495859708..8eeae7a28ac 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 375767c8f51..99fdc346026 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 09f230792a9..3964d54f860 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.rs b/src/test/run-pass/coerce-match.rs index 8c2123a53f5..0992ee97d06 100644 --- a/src/test/run-pass/coerce-match.rs +++ b/src/test/run-pass/coerce-match.rs @@ -10,6 +10,7 @@ // Check that coercions are propagated through match and if expressions. +#![allow(unknown_features)] #![feature(box_syntax)] pub fn main() { diff --git a/src/test/run-pass/const-bound.rs b/src/test/run-pass/const-bound.rs index e24bc1dbff9..3a6973fe61c 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 0088a36eda9..1a3e87b55b6 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 d9b0940f80b..ead0683b870 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 117b133a113..b4ee0246d87 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 aea6ebd2597..b00ceb6ed22 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 b7be14321fd..1a204fa3e20 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 6701a321339..3b89c943edb 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 e3927bd5367..f875d0644a0 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 6d7715ed9a5..7a3b6df539f 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 f1cc4fb1724..66ecfa5a3ac 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 0a12df53de2..909f7f4897a 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 8ef8f1a868d..ad4456b5b59 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 9c0e5a6f5c8..b2092e745a1 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 0b50609fddf..627d197879d 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 56eb340ef59..269e0ee6ce4 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 96c5f81558e..e95d58c706b 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 7d856fd5656..81713657202 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 87f1adba8dd..a2aaaa235e4 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 e566f218aa8..501ba01b4ce 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 8a67e40844a..e5d8ec3f8ad 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 5c1039fe433..1654c87c6a4 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 3d736cca6d5..e41ce37cc3a 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 0dff989002f..d934ce677d1 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 b1fdf51d9b1..5294d05401c 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 5fc9a502ca8..9de1379f480 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 e608f9c46c7..489cd8437d2 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 83f2ada02b0..7958f4927da 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 a08cd33362f..0f8d7c24360 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 6d06c12c450..b23d8db3cfd 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 97b13694872..9e94bca96f7 100644 --- a/src/test/run-pass/func-arg-ref-pattern.rs +++ b/src/test/run-pass/func-arg-ref-pattern.rs @@ -14,6 +14,7 @@ // 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 { diff --git a/src/test/run-pass/generic-alias-unique.rs b/src/test/run-pass/generic-alias-unique.rs index 8b5dfb6cf75..34b7f15e4c6 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 0746c994c2a..a2f7bdfd817 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 e1a8ad7c20a..be83cb04f2c 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 d0a5af8e2ce..986b35cbecf 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 b738b527122..845375d9b84 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 250c5bb66af..b0d4944ba54 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 4821b9354bf..1d39c47417c 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 f83698edc90..0e82ad43782 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 9a43b5b711e..1d1e744ef08 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 8b0d7c18fb1..861c9337390 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 ee82a99a808..eeae3f35cfc 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 3b81943000b..0644fbbc99f 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 f1bbf353f71..fb04f67e380 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 fd0ad1ef47e..883e52b61d0 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 d2895024187..c717053cffc 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 ab080834ac9..de2b4c51e52 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 549a70f19e3..194208620a8 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 ceceb839ed6..f47f1e06011 100644 --- a/src/test/run-pass/issue-11552.rs +++ b/src/test/run-pass/issue-11552.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)] #[derive(Clone)] diff --git a/src/test/run-pass/issue-11677.rs b/src/test/run-pass/issue-11677.rs index 14c1b1b06ea..6fa45058694 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 a91dbd2b716..ec929a9c792 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 b7cd8a90112..75d3c6f334d 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 c0652b946db..3c5ece87b73 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 bb0fe6a87ab..7e533c2cf86 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 afc2fc6cf64..d9763baa826 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 21bda93ecec..4d05b98147b 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 03d18cf8c98..6b273b5786a 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 48fdcb09080..283ea25b6fe 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 1febf337429..75b1e11ddc1 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 552ce565f6b..cb6f068cf45 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 5cdab2d8c44..f7f0d9cb3dc 100644 --- a/src/test/run-pass/issue-16774.rs +++ b/src/test/run-pass/issue-16774.rs @@ -8,8 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unboxed_closures)] +#![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 c5784154a2e..b50bf442b5d 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 f68ab01ea9b..e58fbe0b4c2 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 f61530c7418..6d223923ac1 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 1f371f0a1c2..7baead6929b 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 e2a03c696f2..c146f8a7a9a 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 3ac4b874f3a..1f072af0f5a 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 3ca3e0592e7..6f5f46edc01 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 9eec2d048d4..3e4cffe5dfa 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 74b64bb87cf..cb376d0e439 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 cdc41e892f9..295fd538de6 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 aa2ce824822..de2d4374d78 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 b30c0a117a8..cd71bfce274 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 72cf2219bb6..c08bdf54408 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 9e9d611f1a3..c789921f622 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 139d984b507..a72b272abaa 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 528870d0334..6647fbe2238 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 4ebf981e4ee..12c2155dd57 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 c3cfaf22dee..56eb7486c92 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 926b53cf92c..91c938981c1 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 063b2d70301..5434e44c173 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 7730d75a3a9..bf422bd0405 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 4b5c3566965..2245e80971a 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 3b1a8c4a190..bb79cd4d046 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 222e1d54a5d..e53f4c86923 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 589ccefd9ea..36aa8a9cbca 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 4010c31eed5..6502c66d858 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 e979bc86171..85de03dfe34 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 4b31f393309..d96862b588f 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 2b474b8cfbb..b9f1a8bda7b 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 93bbdea3af7..3163f139328 100644 --- a/src/test/run-pass/issue-6557.rs +++ b/src/test/run-pass/issue-6557.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)] 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 a08bdb09d3d..b6dfbb1ca42 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 e4f4db6ea63..2a2ca4f0712 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 5d5240272e5..2ef1c1d264a 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 369f93222e1..07212237305 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 fbd6c92a020..999fb2c4b69 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 6615bb6368f..9be9f098264 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 206d4db3db4..4a7e844268f 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 b109e94b74f..65808de3cf4 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 6bea1aebc45..9ac016d534f 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 9b20398038d..e55c1b36f3e 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 0e7c959d58c..6883187c402 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 95b75153d4a..ebe01a1d1f2 100644 --- a/src/test/run-pass/match-unique-bind.rs +++ b/src/test/run-pass/match-unique-bind.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() { 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 0e7e9be6765..beb125492b2 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 d4a0d514a7d..e9a1e19d4bf 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 b94f1ae6ba6..7fa810ce154 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 29d100beb06..39018a87394 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 788a25efcf9..ae15bc60746 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 cae783e7ea8..b18c29dc3c1 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 2da6076d138..018cd440cad 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 65d8281407c..50187ef8baa 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 04540c2f35b..6561a9b2d5b 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 2820e0d7120..a10e3f9f5b0 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 286781a4822..9e5eeef7552 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 5e5d01ae6ee..c902677c645 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 29fd070fc19..e496e9e2105 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 0f3d0baecbe..fdb6799b90f 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 f8072851913..388b814b2af 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 fadb89651ca..4ea51b3b409 100644 --- a/src/test/run-pass/new-box-syntax.rs +++ b/src/test/run-pass/new-box-syntax.rs @@ -11,6 +11,7 @@ /* 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. diff --git a/src/test/run-pass/new-box.rs b/src/test/run-pass/new-box.rs index 8531fd5f975..1f2207ad873 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 d74f1349506..130cdc85b01 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 43a6ac296e9..0952bedd6e3 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 0293c4e36ac..bb62b1599a4 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 4964b3f6728..ebdf3c08a22 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 ab3d39e2733..cd97c34f8c6 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 14ddc5d660f..d355999c506 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 8a10cc8c1ef..fb87cd5eb69 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 949a7b158d4..5831d500b83 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 1251394a549..a2cc7b7dfea 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 bc67c0afc7b..637d2c94694 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 498b81d307e..e784318fc76 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 3b2897cf3a6..7fbdd2f219e 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 8ad2dbc1acb..84a230fd576 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 9a758c5d8ad..ba86e3f7b57 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 36f7d88f7d7..30a22512d2a 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 5dba80ad38a..3922cb1219c 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 a7724e68310..0152793d96c 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 4595fb13b07..e38a472fa4c 100644 --- a/src/test/run-pass/regions-dependent-addr-of.rs +++ b/src/test/run-pass/regions-dependent-addr-of.rs @@ -11,6 +11,7 @@ // Test lifetimes are linked properly when we create dependent region pointers. // Issue #3148. +#![allow(unknown_features)] #![feature(box_syntax)] struct A { 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 907f610ff25..3267ff2c7e0 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 5b0b7cc5b4e..9637c43170f 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 e9f774150dc..faa9b37bdcc 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 1ecaf41702e..f397b5124ca 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 d3dbca53f60..708d031a68a 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 c796566b79d..c4852c9162c 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 6eb98104616..e779e002b29 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 0f36dc04575..abd5789bb1f 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 95f90ebbf8e..28d47f7aa9b 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 74416b96e93..40a4dc52a70 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 bced8012b68..e934498ea05 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 75fb98f8e24..3092898d986 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 a6e4716c3b8..89624c3ac16 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 e0d005a485b..fc0b501e9c5 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 b2bcf395783..ca2a8cf5506 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 7ff5960375c..5e6247bac93 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 bc397bb6319..0089646d0a1 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 7d924f977cb..22db6c64770 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 37d69ddfe07..0d4a05bed7f 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 e06e01b9e05..19d76b88901 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 81aa5daaf91..76352c799a0 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 a94f73c2b6d..7e2b7ae0663 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 7265ddf6615..3fcb04d6848 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 63a59b6f750..20a28c5a9ea 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 431a9383b3b..aa290edd863 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 b6b9fb67f90..968f3511247 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 60e59400e1a..dc35d5bf2ca 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 8909f4e261f..da647e90c00 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 2dec53cc13a..8ee3c96f580 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 52855f82673..6701f879e4f 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 d1bd7e908c8..915715727e8 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 4d7830e1cdc..b7980ed9021 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 fb5f6e4a8aa..9e3d9544d42 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 505e9b46e03..81c4b6ab7e5 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 493ec8ddc20..7c9bbd64171 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 64d65a7b2e5..199657fd995 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 67f96decaa9..aab7f4108fb 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 f9bd5114e7d..1c7b4c534ed 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 38be635d837..dba4d8db849 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 ccb21b605c1..e4099c94c2f 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 acd405e2659..cec74d251b3 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 ddc2bb6c30f..d0ad03b773c 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 1d98cfb6b4b..d7c19eb6358 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 e2e7b2ec771..0acdc8f3b80 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 37ca58913ab..752ea830aa5 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 b19fa60518b..3213146cbf4 100644 --- a/src/test/run-pass/unique-destructure.rs +++ b/src/test/run-pass/unique-destructure.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)] struct Foo { a: int, b: int } diff --git a/src/test/run-pass/unique-drop-complex.rs b/src/test/run-pass/unique-drop-complex.rs index a4b6ff5accf..ec2c9f8c666 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 68290d85d0e..0e47d39e55f 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 ccf6a4fd7ae..e1d148cc9a5 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 6769011cffe..301994a74a8 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 8493652cf8a..de2c265089b 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 ffff9b98f54..4f02018346b 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 577a8f1430b..4620815e74e 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 0f8527664b9..389ca2c18b1 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 6e58ec23a3b..b36d08364a2 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 d3f4a8b1090..56f7a3f7990 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 bae87230ba0..05579796dab 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 68b46db3a94..a1502c2eb8c 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 1b6ef92865c..1388c6c5d2b 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 1902fabe639..af82d3e14ea 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 398db63ce08..791c4799bf0 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 eebb1705590..c4f860d930b 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 6d0432faf55..cec523a0671 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 c020fb9183f..eab775fc1db 100644 --- a/src/test/run-pass/unique-pat-2.rs +++ b/src/test/run-pass/unique-pat-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)] 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 559d8f8cb3c..42a4b1a9c0c 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 10ce34961cf..ee975b9c81a 100644 --- a/src/test/run-pass/unique-pat.rs +++ b/src/test/run-pass/unique-pat.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)] fn simple() { diff --git a/src/test/run-pass/unique-rec.rs b/src/test/run-pass/unique-rec.rs index ff7f009990d..756911d29fc 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 bb3019ede4b..5107d166332 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 afafb204c1c..13728585455 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 d467d042e4e..cd3b59a69ba 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 c7e8b2a05ec..285100dd719 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 271f5817c9e..983152cd056 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 bd20a174d1e..27945f46920 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 883ec44bf2e..22201c7d83f 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 554a08ea644..371fd677bd9 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 4a36231e72b..40073c2b742 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 ba66a448c25..6391893b9a4 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(); } From d8598167152fef505189845fa9185c85900c39f1 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 8 Jan 2015 02:37:58 +0100 Subject: [PATCH 14/15] fallout: run-fail tests that use box. (many/all could be ported to `Box::new` instead.) --- src/test/run-fail/args-panic.rs | 3 +++ src/test/run-fail/panic-macro-any-wrapped.rs | 3 +++ src/test/run-fail/panic-macro-any.rs | 3 +++ src/test/run-fail/unique-panic.rs | 4 ++++ src/test/run-fail/unwind-unique.rs | 2 ++ 5 files changed, 15 insertions(+) diff --git a/src/test/run-fail/args-panic.rs b/src/test/run-fail/args-panic.rs index 4878ec59fd4..eab7475bc86 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 e25390a7986..89e47bf46ab 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 b73c66c4f21..231c57390b3 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 07c9a21c5c1..9f643c09795 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 6b5aefbab80..f39ded8f98e 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!(); From ae4bcd41e8014b6057fe0a328c87f32f917396ba Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 8 Jan 2015 02:41:23 +0100 Subject: [PATCH 15/15] fallout: part of changes to compile-fail tests. (follows same pattern as prior two commits.) --- src/test/compile-fail/autoderef-full-lval.rs | 3 +++ src/test/compile-fail/borrow-tuple-fields.rs | 3 +++ src/test/compile-fail/borrowck-array-double-move.rs | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/test/compile-fail/autoderef-full-lval.rs b/src/test/compile-fail/autoderef-full-lval.rs index bbe5af1b516..fb58028658e 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 1d09143c24d..59ed0e5fa06 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 c872d0dc4b9..ef2c629acfe 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]);