diff options
Diffstat (limited to 'src/test')
155 files changed, 232 insertions, 163 deletions
diff --git a/src/test/auxiliary/lint_group_plugin_test.rs b/src/test/auxiliary/lint_group_plugin_test.rs index 097a5827fc4..ae9804423bb 100644 --- a/src/test/auxiliary/lint_group_plugin_test.rs +++ b/src/test/auxiliary/lint_group_plugin_test.rs @@ -11,6 +11,7 @@ // force-host #![feature(plugin_registrar)] +#![feature(box_syntax)] extern crate syntax; diff --git a/src/test/auxiliary/lint_plugin_test.rs b/src/test/auxiliary/lint_plugin_test.rs index 01ef08c4752..06051b87493 100644 --- a/src/test/auxiliary/lint_plugin_test.rs +++ b/src/test/auxiliary/lint_plugin_test.rs @@ -11,6 +11,7 @@ // force-host #![feature(plugin_registrar)] +#![feature(box_syntax)] extern crate syntax; diff --git a/src/test/auxiliary/macro_crate_test.rs b/src/test/auxiliary/macro_crate_test.rs index 99f02cf2d58..9eeb7ee8857 100644 --- a/src/test/auxiliary/macro_crate_test.rs +++ b/src/test/auxiliary/macro_crate_test.rs @@ -11,6 +11,7 @@ // force-host #![feature(plugin_registrar, quote)] +#![feature(box_syntax)] extern crate syntax; extern crate rustc; diff --git a/src/test/auxiliary/plugin_args.rs b/src/test/auxiliary/plugin_args.rs index b90c3f1d727..e01a95d461b 100644 --- a/src/test/auxiliary/plugin_args.rs +++ b/src/test/auxiliary/plugin_args.rs @@ -11,6 +11,7 @@ // force-host #![feature(plugin_registrar)] +#![feature(box_syntax)] extern crate syntax; extern crate rustc; diff --git a/src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs b/src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs index 021eae90cf8..c460c60b02b 100644 --- a/src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs +++ b/src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs @@ -11,6 +11,7 @@ // force-host #![feature(plugin_registrar)] +#![feature(box_syntax)] extern crate rustc; diff --git a/src/test/bench/msgsend-pipes-shared.rs b/src/test/bench/msgsend-pipes-shared.rs index 387601de828..a091e0853f9 100644 --- a/src/test/bench/msgsend-pipes-shared.rs +++ b/src/test/bench/msgsend-pipes-shared.rs @@ -103,6 +103,6 @@ fn main() { args.into_iter().map(|x| x.to_string()).collect() }; - println!("{}", args); + println!("{:?}", args); run(args.as_slice()); } diff --git a/src/test/bench/msgsend-pipes.rs b/src/test/bench/msgsend-pipes.rs index d6d01e5452b..a9e6cef38aa 100644 --- a/src/test/bench/msgsend-pipes.rs +++ b/src/test/bench/msgsend-pipes.rs @@ -112,6 +112,6 @@ fn main() { args.clone().into_iter().map(|x| x.to_string()).collect() }; - println!("{}", args); + println!("{:?}", args); run(args.as_slice()); } diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs index 7bca722e53e..03268b40193 100644 --- a/src/test/bench/shootout-k-nucleotide-pipes.rs +++ b/src/test/bench/shootout-k-nucleotide-pipes.rs @@ -13,6 +13,8 @@ // multi tasking k-nucleotide +#![feature(box_syntax)] + use std::ascii::{AsciiExt, OwnedAsciiExt}; use std::cmp::Ordering::{self, Less, Greater, Equal}; use std::collections::HashMap; @@ -62,7 +64,7 @@ fn sort_and_fmt(mm: &HashMap<Vec<u8> , uint>, total: uint) -> String { let mut buffer = String::new(); for &(ref k, v) in pairs_sorted.iter() { - buffer.push_str(format!("{} {:0.3}\n", + buffer.push_str(format!("{:?} {:0.3}\n", k.to_ascii_uppercase(), v).as_slice()); } @@ -191,8 +193,8 @@ fn main() { // start processing if this is the one ('>', false) => { match line.as_slice().slice_from(1).find_str("THREE") { - option::Option::Some(_) => { proc_mode = true; } - option::Option::None => { } + Some(_) => { proc_mode = true; } + None => { } } } @@ -221,6 +223,6 @@ fn main() { // now fetch and print result messages for (ii, _sz) in sizes.iter().enumerate() { - println!("{}", from_child[ii].recv().unwrap()); + println!("{:?}", from_child[ii].recv().unwrap()); } } diff --git a/src/test/bench/shootout-k-nucleotide.rs b/src/test/bench/shootout-k-nucleotide.rs index 25a23ffed4e..9057372d2cf 100644 --- a/src/test/bench/shootout-k-nucleotide.rs +++ b/src/test/bench/shootout-k-nucleotide.rs @@ -40,6 +40,8 @@ // ignore-android see #10393 #13206 +#![feature(box_syntax)] + use std::ascii::OwnedAsciiExt; use std::iter::repeat; use std::slice; diff --git a/src/test/bench/shootout-regex-dna.rs b/src/test/bench/shootout-regex-dna.rs index 60d33d92549..074c0592312 100644 --- a/src/test/bench/shootout-regex-dna.rs +++ b/src/test/bench/shootout-regex-dna.rs @@ -41,6 +41,8 @@ // ignore-stage1 // ignore-cross-compile #12102 +#![feature(box_syntax)] + extern crate regex; use std::io; diff --git a/src/test/bench/sudoku.rs b/src/test/bench/sudoku.rs index 85e8288b5cd..786bbdfc803 100644 --- a/src/test/bench/sudoku.rs +++ b/src/test/bench/sudoku.rs @@ -10,6 +10,7 @@ // ignore-pretty very bad with line comments +#![feature(box_syntax)] #![allow(non_snake_case)] use std::io::BufferedReader; diff --git a/src/test/bench/task-perf-alloc-unwind.rs b/src/test/bench/task-perf-alloc-unwind.rs index 55e8dcbb6e8..dc536102d5d 100644 --- a/src/test/bench/task-perf-alloc-unwind.rs +++ b/src/test/bench/task-perf-alloc-unwind.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unsafe_destructor)] +#![feature(unsafe_destructor, box_syntax)] use std::os; use std::thread::Thread; diff --git a/src/test/compile-fail/borrowck-bad-nested-calls-free.rs b/src/test/compile-fail/borrowck-bad-nested-calls-free.rs index ab2fc6c67b4..5a7788ed855 100644 --- a/src/test/compile-fail/borrowck-bad-nested-calls-free.rs +++ b/src/test/compile-fail/borrowck-bad-nested-calls-free.rs @@ -11,6 +11,7 @@ // Test that we detect nested calls that could free pointers evaluated // for earlier arguments. +#![feature(box_syntax)] fn rewrite(v: &mut Box<uint>) -> uint { *v = box 22; diff --git a/src/test/compile-fail/borrowck-bad-nested-calls-move.rs b/src/test/compile-fail/borrowck-bad-nested-calls-move.rs index 708eed0d113..263b7f9576b 100644 --- a/src/test/compile-fail/borrowck-bad-nested-calls-move.rs +++ b/src/test/compile-fail/borrowck-bad-nested-calls-move.rs @@ -11,6 +11,7 @@ // Test that we detect nested calls that could free pointers evaluated // for earlier arguments. +#![feature(box_syntax)] fn rewrite(v: &mut Box<uint>) -> uint { *v = box 22; diff --git a/src/test/compile-fail/borrowck-borrow-immut-deref-of-box-as-mut.rs b/src/test/compile-fail/borrowck-borrow-immut-deref-of-box-as-mut.rs index 7e3c4658fc8..84f4e4f8817 100644 --- a/src/test/compile-fail/borrowck-borrow-immut-deref-of-box-as-mut.rs +++ b/src/test/compile-fail/borrowck-borrow-immut-deref-of-box-as-mut.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + struct A; impl A { diff --git a/src/test/compile-fail/borrowck-borrowed-uniq-rvalue.rs b/src/test/compile-fail/borrowck-borrowed-uniq-rvalue.rs index f2ff5f86f63..04ad583a2db 100644 --- a/src/test/compile-fail/borrowck-borrowed-uniq-rvalue.rs +++ b/src/test/compile-fail/borrowck-borrowed-uniq-rvalue.rs @@ -10,6 +10,8 @@ //buggy.rs +#![feature(box_syntax)] + extern crate collections; use std::collections::HashMap; diff --git a/src/test/compile-fail/borrowck-box-insensitivity.rs b/src/test/compile-fail/borrowck-box-insensitivity.rs index d05c03547ac..bd22b61fe3b 100644 --- a/src/test/compile-fail/borrowck-box-insensitivity.rs +++ b/src/test/compile-fail/borrowck-box-insensitivity.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + struct A { x: Box<int>, y: int, diff --git a/src/test/compile-fail/borrowck-call-is-borrow-issue-12224.rs b/src/test/compile-fail/borrowck-call-is-borrow-issue-12224.rs index 6dbdff9441d..9aec8de46b6 100644 --- a/src/test/compile-fail/borrowck-call-is-borrow-issue-12224.rs +++ b/src/test/compile-fail/borrowck-call-is-borrow-issue-12224.rs @@ -11,6 +11,7 @@ // Ensure that invoking a closure counts as a unique immutable borrow #![feature(unboxed_closures)] +#![feature(box_syntax)] type Fn<'a> = Box<FnMut() + 'a>; diff --git a/src/test/compile-fail/borrowck-closures-mut-and-imm.rs b/src/test/compile-fail/borrowck-closures-mut-and-imm.rs index 47a47d04432..126003b5d82 100644 --- a/src/test/compile-fail/borrowck-closures-mut-and-imm.rs +++ b/src/test/compile-fail/borrowck-closures-mut-and-imm.rs @@ -11,6 +11,7 @@ // Tests that two closures cannot simultaneously have mutable // and immutable access to the variable. Issue #6801. +#![feature(box_syntax)] fn get(x: &int) -> int { *x diff --git a/src/test/compile-fail/borrowck-closures-two-mut.rs b/src/test/compile-fail/borrowck-closures-two-mut.rs index 0f284b53849..e1f557cfab2 100644 --- a/src/test/compile-fail/borrowck-closures-two-mut.rs +++ b/src/test/compile-fail/borrowck-closures-two-mut.rs @@ -12,6 +12,7 @@ // access to the variable, whether that mutable access be used // for direct assignment or for taking mutable ref. Issue #6801. +#![feature(box_syntax)] fn a() { let mut x = 3i; diff --git a/src/test/compile-fail/borrowck-closures-use-after-free.rs b/src/test/compile-fail/borrowck-closures-use-after-free.rs index 23c90fcf574..9aa9a50483c 100644 --- a/src/test/compile-fail/borrowck-closures-use-after-free.rs +++ b/src/test/compile-fail/borrowck-closures-use-after-free.rs @@ -12,6 +12,7 @@ // cannot also be supplied a borrowed version of that // variable's contents. Issue #11192. +#![feature(box_syntax)] struct Foo { x: int diff --git a/src/test/compile-fail/borrowck-field-sensitivity.rs b/src/test/compile-fail/borrowck-field-sensitivity.rs index 49c93e3aa9e..52761fa3488 100644 --- a/src/test/compile-fail/borrowck-field-sensitivity.rs +++ b/src/test/compile-fail/borrowck-field-sensitivity.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + struct A { a: int, b: Box<int> } fn deref_after_move() { diff --git a/src/test/compile-fail/borrowck-for-loop-correct-cmt-for-pattern.rs b/src/test/compile-fail/borrowck-for-loop-correct-cmt-for-pattern.rs index f0d42bb9ac1..bdcbc839c00 100644 --- a/src/test/compile-fail/borrowck-for-loop-correct-cmt-for-pattern.rs +++ b/src/test/compile-fail/borrowck-for-loop-correct-cmt-for-pattern.rs @@ -10,6 +10,8 @@ // Issue #16205. +#![feature(box_syntax)] + struct Foo { a: [Box<int>; 3], } diff --git a/src/test/compile-fail/borrowck-issue-14498.rs b/src/test/compile-fail/borrowck-issue-14498.rs index 45dda5fee5a..8e46db5eba8 100644 --- a/src/test/compile-fail/borrowck-issue-14498.rs +++ b/src/test/compile-fail/borrowck-issue-14498.rs @@ -11,6 +11,8 @@ // This tests that we can't modify Box<&mut T> contents while they // are borrowed. +#![feature(box_syntax)] + struct A { a: int } struct B<'a> { a: Box<&'a mut int> } diff --git a/src/test/compile-fail/borrowck-issue-2657-1.rs b/src/test/compile-fail/borrowck-issue-2657-1.rs index 9d28b2a436f..fa80bf38cfe 100644 --- a/src/test/compile-fail/borrowck-issue-2657-1.rs +++ b/src/test/compile-fail/borrowck-issue-2657-1.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() { let x = Some(box 1i); match x { diff --git a/src/test/compile-fail/borrowck-issue-2657-2.rs b/src/test/compile-fail/borrowck-issue-2657-2.rs index 973cf3bf8c8..f531b585dde 100644 --- a/src/test/compile-fail/borrowck-issue-2657-2.rs +++ b/src/test/compile-fail/borrowck-issue-2657-2.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() { let x = Some(box 1i); match x { diff --git a/src/test/compile-fail/borrowck-lend-flow-if.rs b/src/test/compile-fail/borrowck-lend-flow-if.rs index f798d170f96..8a618dfec11 100644 --- a/src/test/compile-fail/borrowck-lend-flow-if.rs +++ b/src/test/compile-fail/borrowck-lend-flow-if.rs @@ -14,6 +14,7 @@ // either genuine or would require more advanced changes. The latter // cases are noted. +#![feature(box_syntax)] fn borrow(_v: &int) {} fn borrow_mut(_v: &mut int) {} diff --git a/src/test/compile-fail/borrowck-lend-flow-loop.rs b/src/test/compile-fail/borrowck-lend-flow-loop.rs index ff038b545d5..954b8010244 100644 --- a/src/test/compile-fail/borrowck-lend-flow-loop.rs +++ b/src/test/compile-fail/borrowck-lend-flow-loop.rs @@ -14,6 +14,7 @@ // either genuine or would require more advanced changes. The latter // cases are noted. +#![feature(box_syntax)] fn borrow(_v: &int) {} fn borrow_mut(_v: &mut int) {} diff --git a/src/test/compile-fail/borrowck-lend-flow.rs b/src/test/compile-fail/borrowck-lend-flow.rs index 85fc7fb87b3..d5419b05851 100644 --- a/src/test/compile-fail/borrowck-lend-flow.rs +++ b/src/test/compile-fail/borrowck-lend-flow.rs @@ -14,6 +14,7 @@ // either genuine or would require more advanced changes. The latter // cases are noted. +#![feature(box_syntax)] fn borrow(_v: &int) {} fn borrow_mut(_v: &mut int) {} diff --git a/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs b/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs index 5c282495cc2..8b39b6ff661 100644 --- a/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs +++ b/src/test/compile-fail/borrowck-loan-blocks-move-cc.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::thread::Thread; fn borrow<F>(v: &int, f: F) where F: FnOnce(&int) { diff --git a/src/test/compile-fail/borrowck-loan-blocks-move.rs b/src/test/compile-fail/borrowck-loan-blocks-move.rs index 3c284ede0c8..f588dbab4fa 100644 --- a/src/test/compile-fail/borrowck-loan-blocks-move.rs +++ b/src/test/compile-fail/borrowck-loan-blocks-move.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] fn take(_v: Box<int>) { } diff --git a/src/test/compile-fail/borrowck-loan-blocks-mut-uniq.rs b/src/test/compile-fail/borrowck-loan-blocks-mut-uniq.rs index b6a71fcd446..e59baa1e37c 100644 --- a/src/test/compile-fail/borrowck-loan-blocks-mut-uniq.rs +++ b/src/test/compile-fail/borrowck-loan-blocks-mut-uniq.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + fn borrow<F>(v: &int, f: F) where F: FnOnce(&int) { f(v); } diff --git a/src/test/compile-fail/borrowck-move-by-capture.rs b/src/test/compile-fail/borrowck-move-by-capture.rs index 35f0751aa78..20212762188 100644 --- a/src/test/compile-fail/borrowck-move-by-capture.rs +++ b/src/test/compile-fail/borrowck-move-by-capture.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() { let bar = box 3; let _g = |&mut:| { diff --git a/src/test/compile-fail/borrowck-move-error-with-note.rs b/src/test/compile-fail/borrowck-move-error-with-note.rs index c61ec39ec50..4984987c5ca 100644 --- a/src/test/compile-fail/borrowck-move-error-with-note.rs +++ b/src/test/compile-fail/borrowck-move-error-with-note.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] enum Foo { Foo1(Box<u32>, Box<u32>), diff --git a/src/test/compile-fail/borrowck-move-from-subpath-of-borrowed-path.rs b/src/test/compile-fail/borrowck-move-from-subpath-of-borrowed-path.rs index 63409f5afb0..936092df42e 100644 --- a/src/test/compile-fail/borrowck-move-from-subpath-of-borrowed-path.rs +++ b/src/test/compile-fail/borrowck-move-from-subpath-of-borrowed-path.rs @@ -11,6 +11,8 @@ // verify that an error is raised when trying to move out of a // borrowed path. +#![feature(box_syntax)] + fn main() { let a = box box 2i; let b = &a; diff --git a/src/test/compile-fail/borrowck-move-moved-value-into-closure.rs b/src/test/compile-fail/borrowck-move-moved-value-into-closure.rs index ca484738cb6..35aef1352d1 100644 --- a/src/test/compile-fail/borrowck-move-moved-value-into-closure.rs +++ b/src/test/compile-fail/borrowck-move-moved-value-into-closure.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + fn call_f<F:FnOnce() -> int>(f: F) -> int { f() } diff --git a/src/test/compile-fail/borrowck-move-subcomponent.rs b/src/test/compile-fail/borrowck-move-subcomponent.rs index a29a171e935..bdf6fe1f21d 100644 --- a/src/test/compile-fail/borrowck-move-subcomponent.rs +++ b/src/test/compile-fail/borrowck-move-subcomponent.rs @@ -11,6 +11,7 @@ // Tests that the borrow checker checks all components of a path when moving // out. +#![feature(box_syntax)] struct S { x : Box<int> diff --git a/src/test/compile-fail/borrowck-multiple-captures.rs b/src/test/compile-fail/borrowck-multiple-captures.rs index 2a26ff7d4a1..e90d25c781b 100644 --- a/src/test/compile-fail/borrowck-multiple-captures.rs +++ b/src/test/compile-fail/borrowck-multiple-captures.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::thread::Thread; fn borrow<T>(_: &T) { } diff --git a/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs b/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs index db3fa6247db..6985d203fb1 100644 --- a/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs +++ b/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] struct node_ { a: Box<cycle> diff --git a/src/test/compile-fail/borrowck-overloaded-index-2.rs b/src/test/compile-fail/borrowck-overloaded-index-2.rs index 53fb935755c..5e6d235574e 100644 --- a/src/test/compile-fail/borrowck-overloaded-index-2.rs +++ b/src/test/compile-fail/borrowck-overloaded-index-2.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::Index; struct MyVec<T> { diff --git a/src/test/compile-fail/borrowck-uniq-via-lend.rs b/src/test/compile-fail/borrowck-uniq-via-lend.rs index 9785b6a8f69..b0e8b2a523b 100644 --- a/src/test/compile-fail/borrowck-uniq-via-lend.rs +++ b/src/test/compile-fail/borrowck-uniq-via-lend.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] fn borrow(_v: &int) {} diff --git a/src/test/compile-fail/borrowck-use-mut-borrow.rs b/src/test/compile-fail/borrowck-use-mut-borrow.rs index 0d27473cb2d..45813c45f03 100644 --- a/src/test/compile-fail/borrowck-use-mut-borrow.rs +++ b/src/test/compile-fail/borrowck-use-mut-borrow.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + struct A { a: int, b: int } impl Copy for A {} diff --git a/src/test/compile-fail/check-static-values-constraints.rs b/src/test/compile-fail/check-static-values-constraints.rs index 1c7ae05961e..c13faacfee4 100644 --- a/src/test/compile-fail/check-static-values-constraints.rs +++ b/src/test/compile-fail/check-static-values-constraints.rs @@ -10,6 +10,8 @@ // Verifies all possible restrictions for statics values. +#![feature(box_syntax)] + use std::marker; struct WithDtor; diff --git a/src/test/compile-fail/class-cast-to-trait.rs b/src/test/compile-fail/class-cast-to-trait.rs index ae0f377ba87..25abd904d21 100644 --- a/src/test/compile-fail/class-cast-to-trait.rs +++ b/src/test/compile-fail/class-cast-to-trait.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] trait noisy { fn speak(&self); diff --git a/src/test/compile-fail/cross-borrow-trait.rs b/src/test/compile-fail/cross-borrow-trait.rs index 1ccd5290fef..ff96ea93184 100644 --- a/src/test/compile-fail/cross-borrow-trait.rs +++ b/src/test/compile-fail/cross-borrow-trait.rs @@ -11,6 +11,8 @@ // Test that cross-borrowing (implicitly converting from `Box<T>` to `&T`) is // forbidden when `T` is a trait. +#![feature(box_syntax)] + struct Foo; trait Trait {} impl Trait for Foo {} diff --git a/src/test/compile-fail/dst-bad-assign-2.rs b/src/test/compile-fail/dst-bad-assign-2.rs index ebd0ee97efe..6c40ca558de 100644 --- a/src/test/compile-fail/dst-bad-assign-2.rs +++ b/src/test/compile-fail/dst-bad-assign-2.rs @@ -10,6 +10,8 @@ // Forbid assignment into a dynamically sized type. +#![feature(box_syntax)] + struct Fat<T: ?Sized> { f1: int, f2: &'static str, diff --git a/src/test/compile-fail/dst-bad-assign.rs b/src/test/compile-fail/dst-bad-assign.rs index f52c990ca52..78f70b9add0 100644 --- a/src/test/compile-fail/dst-bad-assign.rs +++ b/src/test/compile-fail/dst-bad-assign.rs @@ -10,6 +10,8 @@ // Forbid assignment into a dynamically sized type. +#![feature(box_syntax)] + struct Fat<T: ?Sized> { f1: int, f2: &'static str, diff --git a/src/test/compile-fail/dst-rvalue.rs b/src/test/compile-fail/dst-rvalue.rs index 4c1dafd8c1a..74e952364cd 100644 --- a/src/test/compile-fail/dst-rvalue.rs +++ b/src/test/compile-fail/dst-rvalue.rs @@ -10,6 +10,8 @@ // Check that dynamically sized rvalues are forbidden +#![feature(box_syntax)] + pub fn main() { let _x: Box<str> = box *"hello world"; //~^ ERROR E0161 diff --git a/src/test/compile-fail/fn-trait-formatting.rs b/src/test/compile-fail/fn-trait-formatting.rs index 06e8412ddaa..723192952f2 100644 --- a/src/test/compile-fail/fn-trait-formatting.rs +++ b/src/test/compile-fail/fn-trait-formatting.rs @@ -9,6 +9,7 @@ // except according to those terms. #![feature(unboxed_closures)] +#![feature(box_syntax)] fn needs_fn<F>(x: F) where F: Fn(isize) -> isize {} diff --git a/src/test/compile-fail/infinite-autoderef.rs b/src/test/compile-fail/infinite-autoderef.rs index f0b9e796ae6..3635c4dbb02 100644 --- a/src/test/compile-fail/infinite-autoderef.rs +++ b/src/test/compile-fail/infinite-autoderef.rs @@ -10,6 +10,8 @@ // error-pattern: reached the recursion limit while auto-dereferencing +#![feature(box_syntax)] + use std::ops::Deref; struct Foo; diff --git a/src/test/compile-fail/issue-10291.rs b/src/test/compile-fail/issue-10291.rs index dec4fc3b8f5..453746ffd6a 100644 --- a/src/test/compile-fail/issue-10291.rs +++ b/src/test/compile-fail/issue-10291.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + fn test<'x>(x: &'x int) { drop::<Box<for<'z> FnMut(&'z int) -> &'z int>>(box |z| { x diff --git a/src/test/compile-fail/issue-10398.rs b/src/test/compile-fail/issue-10398.rs index c90f064bf90..11c577f9dc3 100644 --- a/src/test/compile-fail/issue-10398.rs +++ b/src/test/compile-fail/issue-10398.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() { let x = box 1i; let f = move|:| { diff --git a/src/test/compile-fail/issue-11192.rs b/src/test/compile-fail/issue-11192.rs index f496c1e1227..3784d3d6437 100644 --- a/src/test/compile-fail/issue-11192.rs +++ b/src/test/compile-fail/issue-11192.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 { x: int } diff --git a/src/test/compile-fail/issue-11515.rs b/src/test/compile-fail/issue-11515.rs index 46fcb2ec340..f0089b0ae5b 100644 --- a/src/test/compile-fail/issue-11515.rs +++ b/src/test/compile-fail/issue-11515.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + struct Test<'s> { func: Box<FnMut()+'static> } diff --git a/src/test/compile-fail/issue-11844.rs b/src/test/compile-fail/issue-11844.rs index 55c12b051b9..560cbe1b8a8 100644 --- a/src/test/compile-fail/issue-11844.rs +++ b/src/test/compile-fail/issue-11844.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() { let a = Some(box 1); match a { diff --git a/src/test/compile-fail/issue-11925.rs b/src/test/compile-fail/issue-11925.rs index c561f0a696a..71e4598d635 100644 --- a/src/test/compile-fail/issue-11925.rs +++ b/src/test/compile-fail/issue-11925.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() { let r = { let x = box 42i; diff --git a/src/test/compile-fail/issue-12127.rs b/src/test/compile-fail/issue-12127.rs index 5f2837d2875..2d87bdaf524 100644 --- a/src/test/compile-fail/issue-12127.rs +++ b/src/test/compile-fail/issue-12127.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + fn do_it(x: &int) { } fn main() { diff --git a/src/test/compile-fail/issue-12470.rs b/src/test/compile-fail/issue-12470.rs index 0202d538cf6..31874655302 100644 --- a/src/test/compile-fail/issue-12470.rs +++ b/src/test/compile-fail/issue-12470.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + trait X { fn get_i(&self) -> int; } diff --git a/src/test/compile-fail/issue-14915.rs b/src/test/compile-fail/issue-14915.rs index 142fecc31fe..18e4ccc3311 100644 --- a/src/test/compile-fail/issue-14915.rs +++ b/src/test/compile-fail/issue-14915.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() { let x: Box<isize> = box 0; diff --git a/src/test/compile-fail/issue-17263.rs b/src/test/compile-fail/issue-17263.rs index b610a2b0c91..ba993259216 100644 --- a/src/test/compile-fail/issue-17263.rs +++ b/src/test/compile-fail/issue-17263.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 } fn main() { diff --git a/src/test/compile-fail/issue-17441.rs b/src/test/compile-fail/issue-17441.rs index 6ae4fbca8b0..a28162159a5 100644 --- a/src/test/compile-fail/issue-17441.rs +++ b/src/test/compile-fail/issue-17441.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() { let _foo = &[1u, 2] as [usize]; //~^ ERROR cast to unsized type: `&[usize; 2]` as `[usize]` diff --git a/src/test/compile-fail/issue-17651.rs b/src/test/compile-fail/issue-17651.rs index 589f1cf44bf..d3678f7d87f 100644 --- a/src/test/compile-fail/issue-17651.rs +++ b/src/test/compile-fail/issue-17651.rs @@ -11,6 +11,8 @@ // Test that moves of unsized values within closures are caught // and rejected. +#![feature(box_syntax)] + fn main() { (|&:| box *[0us].as_slice())(); //~^ ERROR cannot move out of dereference diff --git a/src/test/compile-fail/issue-17913.rs b/src/test/compile-fail/issue-17913.rs index 7ae8dfef9bc..e2dbad56f84 100644 --- a/src/test/compile-fail/issue-17913.rs +++ b/src/test/compile-fail/issue-17913.rs @@ -8,8 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. + // error-pattern: too big for the current architecture +#![feature(box_syntax)] + #[cfg(any(all(stage0, target_word_size = "64"), all(not(stage0), target_pointer_width = "64")))] fn main() { let n = 0u; diff --git a/src/test/compile-fail/issue-18783.rs b/src/test/compile-fail/issue-18783.rs index 3a0fbddf818..657ef85233d 100644 --- a/src/test/compile-fail/issue-18783.rs +++ b/src/test/compile-fail/issue-18783.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::cell::RefCell; fn main() { diff --git a/src/test/compile-fail/issue-3763.rs b/src/test/compile-fail/issue-3763.rs index 73d42aa0de1..06939d8f358 100644 --- a/src/test/compile-fail/issue-3763.rs +++ b/src/test/compile-fail/issue-3763.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] mod my_mod { pub struct MyStruct { diff --git a/src/test/compile-fail/issue-4335.rs b/src/test/compile-fail/issue-4335.rs index d4f9ea5b276..f35332a2f03 100644 --- a/src/test/compile-fail/issue-4335.rs +++ b/src/test/compile-fail/issue-4335.rs @@ -9,6 +9,7 @@ // except according to those terms. #![feature(unboxed_closures)] +#![feature(box_syntax)] fn id<T>(t: T) -> T { t } diff --git a/src/test/compile-fail/issue-5439.rs b/src/test/compile-fail/issue-5439.rs index 55e3459a589..72074d64edc 100644 --- a/src/test/compile-fail/issue-5439.rs +++ b/src/test/compile-fail/issue-5439.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 { foo: int, diff --git a/src/test/compile-fail/issue-5543.rs b/src/test/compile-fail/issue-5543.rs index 2d64013dc27..cf98f1572e5 100644 --- a/src/test/compile-fail/issue-5543.rs +++ b/src/test/compile-fail/issue-5543.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + trait Foo {} impl Foo for u8 {} diff --git a/src/test/compile-fail/issue-6801.rs b/src/test/compile-fail/issue-6801.rs index 433ae3bf89e..27230989f63 100644 --- a/src/test/compile-fail/issue-6801.rs +++ b/src/test/compile-fail/issue-6801.rs @@ -12,6 +12,7 @@ // transferring ownership of the owned box before invoking the stack // closure results in a crash. +#![feature(box_syntax)] fn twice(x: Box<uint>) -> uint { *x * 2 diff --git a/src/test/compile-fail/issue-7013.rs b/src/test/compile-fail/issue-7013.rs index d2f9ee47603..d246e4e54d0 100644 --- a/src/test/compile-fail/issue-7013.rs +++ b/src/test/compile-fail/issue-7013.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::cell::RefCell; use std::rc::Rc; diff --git a/src/test/compile-fail/issue-7364.rs b/src/test/compile-fail/issue-7364.rs index c8c7ef4ed89..b4df38a6aac 100644 --- a/src/test/compile-fail/issue-7364.rs +++ b/src/test/compile-fail/issue-7364.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] use std::cell::RefCell; diff --git a/src/test/compile-fail/kindck-impl-type-params-2.rs b/src/test/compile-fail/kindck-impl-type-params-2.rs index 9e7c983195a..e188fa9b813 100644 --- a/src/test/compile-fail/kindck-impl-type-params-2.rs +++ b/src/test/compile-fail/kindck-impl-type-params-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + trait Foo { } diff --git a/src/test/compile-fail/kindck-impl-type-params.rs b/src/test/compile-fail/kindck-impl-type-params.rs index 6ecf2593d00..34e77353463 100644 --- a/src/test/compile-fail/kindck-impl-type-params.rs +++ b/src/test/compile-fail/kindck-impl-type-params.rs @@ -11,6 +11,8 @@ // Issue #14061: tests the interaction between generic implementation // parameter bounds and trait objects. +#![feature(box_syntax)] + struct S<T>; trait Gettable<T> {} diff --git a/src/test/compile-fail/kindck-inherited-copy-bound.rs b/src/test/compile-fail/kindck-inherited-copy-bound.rs index 7f610176b65..192e358283f 100644 --- a/src/test/compile-fail/kindck-inherited-copy-bound.rs +++ b/src/test/compile-fail/kindck-inherited-copy-bound.rs @@ -10,6 +10,8 @@ // Test that Copy bounds inherited by trait are checked. +#![feature(box_syntax)] + use std::any::Any; trait Foo : Copy { diff --git a/src/test/compile-fail/lint-owned-heap-memory.rs b/src/test/compile-fail/lint-owned-heap-memory.rs index 5ee16f0aa26..1702cefec6d 100644 --- a/src/test/compile-fail/lint-owned-heap-memory.rs +++ b/src/test/compile-fail/lint-owned-heap-memory.rs @@ -10,7 +10,7 @@ #![allow(dead_code)] #![forbid(box_pointers)] - +#![feature(box_syntax)] struct Foo { x: Box<int> //~ ERROR type uses owned diff --git a/src/test/compile-fail/liveness-move-call-arg.rs b/src/test/compile-fail/liveness-move-call-arg.rs index b9ad1c0fb65..08a523fb8ff 100644 --- a/src/test/compile-fail/liveness-move-call-arg.rs +++ b/src/test/compile-fail/liveness-move-call-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 take(_x: Box<int>) {} diff --git a/src/test/compile-fail/liveness-move-in-loop.rs b/src/test/compile-fail/liveness-move-in-loop.rs index 127a68bd339..b2142258fb0 100644 --- a/src/test/compile-fail/liveness-move-in-loop.rs +++ b/src/test/compile-fail/liveness-move-in-loop.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() { let y: Box<int> = box 42; let mut x: Box<int>; diff --git a/src/test/compile-fail/liveness-move-in-while.rs b/src/test/compile-fail/liveness-move-in-while.rs index 2cebe3f573b..549cf523d03 100644 --- a/src/test/compile-fail/liveness-move-in-while.rs +++ b/src/test/compile-fail/liveness-move-in-while.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() { let y: Box<int> = box 42; let mut x: Box<int>; diff --git a/src/test/compile-fail/liveness-use-after-move.rs b/src/test/compile-fail/liveness-use-after-move.rs index a988254141a..e1cd12989ca 100644 --- a/src/test/compile-fail/liveness-use-after-move.rs +++ b/src/test/compile-fail/liveness-use-after-move.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() { let x = box 5i; let y = x; diff --git a/src/test/compile-fail/macros-nonfatal-errors.rs b/src/test/compile-fail/macros-nonfatal-errors.rs index f97cad559a1..ce1b372a4c1 100644 --- a/src/test/compile-fail/macros-nonfatal-errors.rs +++ b/src/test/compile-fail/macros-nonfatal-errors.rs @@ -22,9 +22,6 @@ enum CantDeriveThose {} fn main() { doesnt_exist!(); //~ ERROR - bytes!(invalid); //~ ERROR non-literal in bytes! - //~^ WARN `bytes!` is deprecated - asm!(invalid); //~ ERROR concat_idents!("not", "idents"); //~ ERROR diff --git a/src/test/compile-fail/map-types.rs b/src/test/compile-fail/map-types.rs index 7aafeced3a6..ba2205f5868 100644 --- a/src/test/compile-fail/map-types.rs +++ b/src/test/compile-fail/map-types.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + extern crate collections; use std::collections::HashMap; diff --git a/src/test/compile-fail/move-out-of-tuple-field.rs b/src/test/compile-fail/move-out-of-tuple-field.rs index 7fcb54e0467..78b6736c1c8 100644 --- a/src/test/compile-fail/move-out-of-tuple-field.rs +++ b/src/test/compile-fail/move-out-of-tuple-field.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(Box<int>); fn main() { diff --git a/src/test/compile-fail/moves-based-on-type-move-out-of-closure-env-issue-1965.rs b/src/test/compile-fail/moves-based-on-type-move-out-of-closure-env-issue-1965.rs index ab762332ee4..0f5e012ef19 100644 --- a/src/test/compile-fail/moves-based-on-type-move-out-of-closure-env-issue-1965.rs +++ b/src/test/compile-fail/moves-based-on-type-move-out-of-closure-env-issue-1965.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::uint; fn test(_x: Box<uint>) {} diff --git a/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs b/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs index 9053f97e8a7..f410541f0b7 100644 --- a/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs +++ b/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs @@ -12,6 +12,7 @@ // bound must be noncopyable. For details see // http://smallcultfollowing.com/babysteps/blog/2013/04/30/the-case-of-the-recurring-closure/ +#![feature(box_syntax)] #![feature(unboxed_closures)] struct R<'a> { diff --git a/src/test/compile-fail/moves-based-on-type-tuple.rs b/src/test/compile-fail/moves-based-on-type-tuple.rs index 85c435ef0db..397b22c486e 100644 --- a/src/test/compile-fail/moves-based-on-type-tuple.rs +++ b/src/test/compile-fail/moves-based-on-type-tuple.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] fn dup(x: Box<int>) -> Box<(Box<int>,Box<int>)> { box() (x, x) } //~ ERROR use of moved value fn main() { diff --git a/src/test/compile-fail/moves-sru-moved-field.rs b/src/test/compile-fail/moves-sru-moved-field.rs index 2cf7618d92d..6c351f88713 100644 --- a/src/test/compile-fail/moves-sru-moved-field.rs +++ b/src/test/compile-fail/moves-sru-moved-field.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] type Noncopyable = Box<int>; diff --git a/src/test/compile-fail/mut-cross-borrowing.rs b/src/test/compile-fail/mut-cross-borrowing.rs index 657c2832c49..90bc0019531 100644 --- a/src/test/compile-fail/mut-cross-borrowing.rs +++ b/src/test/compile-fail/mut-cross-borrowing.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + fn f(_: &mut int) {} fn main() { diff --git a/src/test/compile-fail/occurs-check-2.rs b/src/test/compile-fail/occurs-check-2.rs index 2765182225f..bfabcff5116 100644 --- a/src/test/compile-fail/occurs-check-2.rs +++ b/src/test/compile-fail/occurs-check-2.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] fn main() { let f; diff --git a/src/test/compile-fail/occurs-check.rs b/src/test/compile-fail/occurs-check.rs index 44318b36f4b..417bd9b57ee 100644 --- a/src/test/compile-fail/occurs-check.rs +++ b/src/test/compile-fail/occurs-check.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] fn main() { let f; diff --git a/src/test/compile-fail/region-object-lifetime-in-coercion.rs b/src/test/compile-fail/region-object-lifetime-in-coercion.rs index b2b2d3337c4..e4521873a61 100644 --- a/src/test/compile-fail/region-object-lifetime-in-coercion.rs +++ b/src/test/compile-fail/region-object-lifetime-in-coercion.rs @@ -11,6 +11,8 @@ // Test that attempts to implicitly coerce a value into an // object respect the lifetime bound on the object type. +#![feature(box_syntax)] + trait Foo {} impl<'a> Foo for &'a [u8] {} diff --git a/src/test/compile-fail/regions-close-associated-type-into-object.rs b/src/test/compile-fail/regions-close-associated-type-into-object.rs index 816314529b5..8a03f36972d 100644 --- a/src/test/compile-fail/regions-close-associated-type-into-object.rs +++ b/src/test/compile-fail/regions-close-associated-type-into-object.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + trait X {} trait Iter { diff --git a/src/test/compile-fail/regions-close-object-into-object.rs b/src/test/compile-fail/regions-close-object-into-object.rs index 48945868bd3..675f86b58f4 100644 --- a/src/test/compile-fail/regions-close-object-into-object.rs +++ b/src/test/compile-fail/regions-close-object-into-object.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] trait A<T> {} struct B<'a, T>(&'a (A<T>+'a)); diff --git a/src/test/compile-fail/regions-close-over-borrowed-ref-in-obj.rs b/src/test/compile-fail/regions-close-over-borrowed-ref-in-obj.rs index 037514f45c7..e17786e6a51 100644 --- a/src/test/compile-fail/regions-close-over-borrowed-ref-in-obj.rs +++ b/src/test/compile-fail/regions-close-over-borrowed-ref-in-obj.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + trait Foo { } impl<'a> Foo for &'a int { } diff --git a/src/test/compile-fail/regions-close-over-type-parameter-1.rs b/src/test/compile-fail/regions-close-over-type-parameter-1.rs index 5465f199f40..985ae6116f0 100644 --- a/src/test/compile-fail/regions-close-over-type-parameter-1.rs +++ b/src/test/compile-fail/regions-close-over-type-parameter-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + // Test for what happens when a type parameter `A` is closed over into // an object. This should yield errors unless `A` (and the object) // both have suitable bounds. diff --git a/src/test/compile-fail/regions-close-over-type-parameter-2.rs b/src/test/compile-fail/regions-close-over-type-parameter-2.rs index 0ee349aaebf..85ff336b4cb 100644 --- a/src/test/compile-fail/regions-close-over-type-parameter-2.rs +++ b/src/test/compile-fail/regions-close-over-type-parameter-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + // Test for what happens when a type parameter `A` is closed over into // an object. This should yield errors unless `A` (and the object) // both have suitable bounds. diff --git a/src/test/compile-fail/regions-close-over-type-parameter-multiple.rs b/src/test/compile-fail/regions-close-over-type-parameter-multiple.rs index cec785c6e96..2aa77b2e53d 100644 --- a/src/test/compile-fail/regions-close-over-type-parameter-multiple.rs +++ b/src/test/compile-fail/regions-close-over-type-parameter-multiple.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + // Various tests where we over type parameters with multiple lifetime // bounds. diff --git a/src/test/compile-fail/regions-close-param-into-object.rs b/src/test/compile-fail/regions-close-param-into-object.rs index 3e91d090c31..74b36958c92 100644 --- a/src/test/compile-fail/regions-close-param-into-object.rs +++ b/src/test/compile-fail/regions-close-param-into-object.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] trait X {} diff --git a/src/test/compile-fail/regions-nested-fns.rs b/src/test/compile-fail/regions-nested-fns.rs index 5d8ef718ef0..e8054779774 100644 --- a/src/test/compile-fail/regions-nested-fns.rs +++ b/src/test/compile-fail/regions-nested-fns.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + fn ignore<T>(t: T) {} fn nested<'x>(x: &'x int) { diff --git a/src/test/compile-fail/regions-proc-bound-capture.rs b/src/test/compile-fail/regions-proc-bound-capture.rs index 0841c1852f8..b849ddf7b82 100644 --- a/src/test/compile-fail/regions-proc-bound-capture.rs +++ b/src/test/compile-fail/regions-proc-bound-capture.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + fn borrowed_proc<'a>(x: &'a int) -> Box<FnMut()->(int) + 'a> { // This is legal, because the region bound on `proc` // states that it captures `x`. diff --git a/src/test/compile-fail/regions-steal-closure.rs b/src/test/compile-fail/regions-steal-closure.rs index 991040bc62f..12f5f295499 100644 --- a/src/test/compile-fail/regions-steal-closure.rs +++ b/src/test/compile-fail/regions-steal-closure.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] #![feature(unboxed_closures)] struct closure_box<'a> { diff --git a/src/test/compile-fail/regions-trait-1.rs b/src/test/compile-fail/regions-trait-1.rs index 7771a71c79b..32d89607e4b 100644 --- a/src/test/compile-fail/regions-trait-1.rs +++ b/src/test/compile-fail/regions-trait-1.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] struct ctxt { v: uint } diff --git a/src/test/compile-fail/regions-trait-variance.rs b/src/test/compile-fail/regions-trait-variance.rs index 4e31a41c4e0..22e43c0bf89 100644 --- a/src/test/compile-fail/regions-trait-variance.rs +++ b/src/test/compile-fail/regions-trait-variance.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + // Issue #12470. trait X { diff --git a/src/test/compile-fail/shadowed-type-parameter.rs b/src/test/compile-fail/shadowed-type-parameter.rs index c6286bc0a2b..1a3d7821159 100644 --- a/src/test/compile-fail/shadowed-type-parameter.rs +++ b/src/test/compile-fail/shadowed-type-parameter.rs @@ -10,6 +10,8 @@ // Test that shadowed lifetimes generate an error. +#![feature(box_syntax)] + struct Foo<T>; impl<T> Foo<T> { @@ -22,7 +24,7 @@ impl<T> Foo<T> { } } -trait<T> Bar<T> { +trait Bar<T> { fn shadow_in_required<T>(&self); //~^ ERROR type parameter `T` shadows another type parameter diff --git a/src/test/compile-fail/static-mut-not-constant.rs b/src/test/compile-fail/static-mut-not-constant.rs index 84c72de5548..fd05f05502e 100644 --- a/src/test/compile-fail/static-mut-not-constant.rs +++ b/src/test/compile-fail/static-mut-not-constant.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] static mut a: Box<int> = box 3; //~^ ERROR statics are not allowed to have custom pointers diff --git a/src/test/compile-fail/static-region-bound.rs b/src/test/compile-fail/static-region-bound.rs index 1e5a5ecc08e..42f9d24bc52 100644 --- a/src/test/compile-fail/static-region-bound.rs +++ b/src/test/compile-fail/static-region-bound.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] fn f<T:'static>(_: T) {} diff --git a/src/test/compile-fail/syntax-extension-bytes-non-ascii-char-literal.rs b/src/test/compile-fail/syntax-extension-bytes-non-ascii-char-literal.rs deleted file mode 100644 index d03696cbbbc..00000000000 --- a/src/test/compile-fail/syntax-extension-bytes-non-ascii-char-literal.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -fn main() { - let vec = bytes!('λ'); //~ ERROR non-ascii char literal in bytes! - //~^ WARN `bytes!` is deprecated -} diff --git a/src/test/compile-fail/syntax-extension-bytes-too-large-integer-literal.rs b/src/test/compile-fail/syntax-extension-bytes-too-large-integer-literal.rs deleted file mode 100644 index 8e7c6147758..00000000000 --- a/src/test/compile-fail/syntax-extension-bytes-too-large-integer-literal.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -fn main() { - let vec = bytes!(1024); //~ ERROR too large integer literal in bytes! - //~^ WARN `bytes!` is deprecated -} diff --git a/src/test/compile-fail/syntax-extension-bytes-too-large-u8-literal.rs b/src/test/compile-fail/syntax-extension-bytes-too-large-u8-literal.rs deleted file mode 100644 index 1a9aa3753ee..00000000000 --- a/src/test/compile-fail/syntax-extension-bytes-too-large-u8-literal.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -fn main() { - let vec = bytes!(1024u8); //~ ERROR too large u8 literal in bytes! - //~^ WARN `bytes!` is deprecated -} diff --git a/src/test/compile-fail/syntax-extension-bytes-too-small-integer-literal.rs b/src/test/compile-fail/syntax-extension-bytes-too-small-integer-literal.rs deleted file mode 100644 index c2d49735943..00000000000 --- a/src/test/compile-fail/syntax-extension-bytes-too-small-integer-literal.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -fn main() { - let vec = bytes!(-1024); //~ ERROR non-literal in bytes - //~^ WARN `bytes!` is deprecated -} diff --git a/src/test/compile-fail/syntax-extension-bytes-too-small-u8-literal.rs b/src/test/compile-fail/syntax-extension-bytes-too-small-u8-literal.rs deleted file mode 100644 index ac33ffb60e2..00000000000 --- a/src/test/compile-fail/syntax-extension-bytes-too-small-u8-literal.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -fn main() { - let vec = bytes!(-1024u8); //~ ERROR non-literal in bytes - //~^ WARN `bytes!` is deprecated -} diff --git a/src/test/compile-fail/syntax-extension-bytes-unsupported-literal.rs b/src/test/compile-fail/syntax-extension-bytes-unsupported-literal.rs deleted file mode 100644 index f6b3659354c..00000000000 --- a/src/test/compile-fail/syntax-extension-bytes-unsupported-literal.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -fn main() { - let vec = bytes!(45f64); //~ ERROR unsupported literal in bytes! - //~^ WARN `bytes!` is deprecated -} diff --git a/src/test/compile-fail/trait-coercion-generic-bad.rs b/src/test/compile-fail/trait-coercion-generic-bad.rs index e6ea8e10b22..1ddfc5b7ccd 100644 --- a/src/test/compile-fail/trait-coercion-generic-bad.rs +++ b/src/test/compile-fail/trait-coercion-generic-bad.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] struct Struct { person: &'static str diff --git a/src/test/compile-fail/trait-coercion-generic-regions.rs b/src/test/compile-fail/trait-coercion-generic-regions.rs index 5f4d51918ed..9c78d7ea243 100644 --- a/src/test/compile-fail/trait-coercion-generic-regions.rs +++ b/src/test/compile-fail/trait-coercion-generic-regions.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] struct Struct { person: &'static str diff --git a/src/test/compile-fail/trait-test-2.rs b/src/test/compile-fail/trait-test-2.rs index a24f7710d7b..f66034e395c 100644 --- a/src/test/compile-fail/trait-test-2.rs +++ b/src/test/compile-fail/trait-test-2.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] trait bar { fn dup(&self) -> Self; fn blah<X>(&self); } impl bar for int { fn dup(&self) -> int { *self } fn blah<X>(&self) {} } diff --git a/src/test/compile-fail/ufcs-explicit-self-bad.rs b/src/test/compile-fail/ufcs-explicit-self-bad.rs index 8d3610affdf..5ba660495f7 100644 --- a/src/test/compile-fail/ufcs-explicit-self-bad.rs +++ b/src/test/compile-fail/ufcs-explicit-self-bad.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 { f: int, } diff --git a/src/test/compile-fail/unboxed-closure-illegal-move.rs b/src/test/compile-fail/unboxed-closure-illegal-move.rs index 9e981f2c9bb..4d6f04da026 100644 --- a/src/test/compile-fail/unboxed-closure-illegal-move.rs +++ b/src/test/compile-fail/unboxed-closure-illegal-move.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] #![feature(unboxed_closures)] // Tests that we can't move out of an unboxed closure environment diff --git a/src/test/compile-fail/unique-object-noncopyable.rs b/src/test/compile-fail/unique-object-noncopyable.rs index e237e2c8b75..2dde11ada28 100644 --- a/src/test/compile-fail/unique-object-noncopyable.rs +++ b/src/test/compile-fail/unique-object-noncopyable.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] trait Foo { fn f(&self); diff --git a/src/test/compile-fail/unique-pinned-nocopy.rs b/src/test/compile-fail/unique-pinned-nocopy.rs index d306d171ca8..04eaa3d7ae0 100644 --- a/src/test/compile-fail/unique-pinned-nocopy.rs +++ b/src/test/compile-fail/unique-pinned-nocopy.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + #[derive(Show)] struct r { b: bool, diff --git a/src/test/compile-fail/unique-unique-kind.rs b/src/test/compile-fail/unique-unique-kind.rs index 49cebbf5255..ae354729b92 100644 --- a/src/test/compile-fail/unique-unique-kind.rs +++ b/src/test/compile-fail/unique-unique-kind.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] use std::rc::Rc; diff --git a/src/test/compile-fail/unique-vec-res.rs b/src/test/compile-fail/unique-vec-res.rs index 4848c988300..b558989304f 100644 --- a/src/test/compile-fail/unique-vec-res.rs +++ b/src/test/compile-fail/unique-vec-res.rs @@ -10,6 +10,8 @@ #![feature(unsafe_destructor)] +#![feature(box_syntax)] + use std::cell::Cell; #[derive(Show)] diff --git a/src/test/compile-fail/use-after-move-implicity-coerced-object.rs b/src/test/compile-fail/use-after-move-implicity-coerced-object.rs index 364bfc42985..d8a82d8fbf0 100644 --- a/src/test/compile-fail/use-after-move-implicity-coerced-object.rs +++ b/src/test/compile-fail/use-after-move-implicity-coerced-object.rs @@ -10,6 +10,8 @@ // ignore-tidy-linelength +#![feature(box_syntax)] + use std::fmt; struct Number { diff --git a/src/test/compile-fail/use-after-move-self.rs b/src/test/compile-fail/use-after-move-self.rs index 607d6163208..ce0f2808e33 100644 --- a/src/test/compile-fail/use-after-move-self.rs +++ b/src/test/compile-fail/use-after-move-self.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] struct S { x: Box<int>, diff --git a/src/test/debuginfo/borrowed-struct.rs b/src/test/debuginfo/borrowed-struct.rs index e3cf438be43..53d2befc49d 100644 --- a/src/test/debuginfo/borrowed-struct.rs +++ b/src/test/debuginfo/borrowed-struct.rs @@ -64,6 +64,7 @@ // lldb-check:[...]$6 = 26.5 #![allow(unused_variables)] +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] struct SomeStruct { diff --git a/src/test/debuginfo/borrowed-tuple.rs b/src/test/debuginfo/borrowed-tuple.rs index ce0930f2fbf..c7e5987fbcf 100644 --- a/src/test/debuginfo/borrowed-tuple.rs +++ b/src/test/debuginfo/borrowed-tuple.rs @@ -42,6 +42,7 @@ #![allow(unused_variables)] +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] fn main() { diff --git a/src/test/debuginfo/borrowed-unique-basic.rs b/src/test/debuginfo/borrowed-unique-basic.rs index d152775a8ed..fc186a0b5b2 100644 --- a/src/test/debuginfo/borrowed-unique-basic.rs +++ b/src/test/debuginfo/borrowed-unique-basic.rs @@ -112,6 +112,7 @@ // lldb-check:[...]$12 = 3.5 #![allow(unused_variables)] +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] fn main() { diff --git a/src/test/debuginfo/box.rs b/src/test/debuginfo/box.rs index 5a70eb19041..0439e3dc34d 100644 --- a/src/test/debuginfo/box.rs +++ b/src/test/debuginfo/box.rs @@ -32,6 +32,7 @@ // lldb-check:[...]$1 = (2, 3.5) #![allow(unused_variables)] +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] fn main() { diff --git a/src/test/debuginfo/boxed-struct.rs b/src/test/debuginfo/boxed-struct.rs index f9d762bf99d..6397efa0a96 100644 --- a/src/test/debuginfo/boxed-struct.rs +++ b/src/test/debuginfo/boxed-struct.rs @@ -35,6 +35,7 @@ // lldb-check:[...]$1 = StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 } #![allow(unused_variables)] +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] struct StructWithSomePadding { diff --git a/src/test/debuginfo/closure-in-generic-function.rs b/src/test/debuginfo/closure-in-generic-function.rs index e3cb190c3f2..f8b12569400 100644 --- a/src/test/debuginfo/closure-in-generic-function.rs +++ b/src/test/debuginfo/closure-in-generic-function.rs @@ -46,6 +46,7 @@ // lldb-check:[...]$3 = 110 // lldb-command:continue +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] fn some_generic_fun<T1, T2>(a: T1, b: T2) -> (T2, T1) { diff --git a/src/test/debuginfo/destructured-fn-argument.rs b/src/test/debuginfo/destructured-fn-argument.rs index b4688e4928a..73289c56bef 100644 --- a/src/test/debuginfo/destructured-fn-argument.rs +++ b/src/test/debuginfo/destructured-fn-argument.rs @@ -311,6 +311,7 @@ // lldb-command:continue #![allow(unused_variables)] +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] use self::Univariant::Unit; diff --git a/src/test/debuginfo/destructured-for-loop-variable.rs b/src/test/debuginfo/destructured-for-loop-variable.rs index 364720d0e4f..103bdc03550 100644 --- a/src/test/debuginfo/destructured-for-loop-variable.rs +++ b/src/test/debuginfo/destructured-for-loop-variable.rs @@ -153,6 +153,7 @@ // lldb-command:continue #![allow(unused_variables)] +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] struct Struct { diff --git a/src/test/debuginfo/destructured-local.rs b/src/test/debuginfo/destructured-local.rs index d5a6b36f1fc..1fd598e18c1 100644 --- a/src/test/debuginfo/destructured-local.rs +++ b/src/test/debuginfo/destructured-local.rs @@ -244,6 +244,7 @@ #![allow(unused_variables)] +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] use self::Univariant::Unit; diff --git a/src/test/debuginfo/generic-method-on-generic-struct.rs b/src/test/debuginfo/generic-method-on-generic-struct.rs index 0e358499a3d..66cd73622ff 100644 --- a/src/test/debuginfo/generic-method-on-generic-struct.rs +++ b/src/test/debuginfo/generic-method-on-generic-struct.rs @@ -112,6 +112,7 @@ // lldb-check:[...]$14 = -10.5 // lldb-command:continue +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] struct Struct<T> { diff --git a/src/test/debuginfo/method-on-enum.rs b/src/test/debuginfo/method-on-enum.rs index b1ebb124d4e..732e1d5c500 100644 --- a/src/test/debuginfo/method-on-enum.rs +++ b/src/test/debuginfo/method-on-enum.rs @@ -113,6 +113,7 @@ // lldb-check:[...]$14 = -10 // lldb-command:continue +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] enum Enum { diff --git a/src/test/debuginfo/method-on-generic-struct.rs b/src/test/debuginfo/method-on-generic-struct.rs index 68a6ac8c1f3..c1785951e23 100644 --- a/src/test/debuginfo/method-on-generic-struct.rs +++ b/src/test/debuginfo/method-on-generic-struct.rs @@ -113,6 +113,7 @@ // lldb-command:continue +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] struct Struct<T> { diff --git a/src/test/debuginfo/method-on-struct.rs b/src/test/debuginfo/method-on-struct.rs index 84e74d4364c..d88a32b8475 100644 --- a/src/test/debuginfo/method-on-struct.rs +++ b/src/test/debuginfo/method-on-struct.rs @@ -113,6 +113,7 @@ // lldb-command:continue +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] struct Struct { diff --git a/src/test/debuginfo/method-on-trait.rs b/src/test/debuginfo/method-on-trait.rs index f53bb11eac4..5622d17225b 100644 --- a/src/test/debuginfo/method-on-trait.rs +++ b/src/test/debuginfo/method-on-trait.rs @@ -113,6 +113,7 @@ // lldb-command:continue +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] struct Struct { diff --git a/src/test/debuginfo/method-on-tuple-struct.rs b/src/test/debuginfo/method-on-tuple-struct.rs index 6994c38818c..02f7808221a 100644 --- a/src/test/debuginfo/method-on-tuple-struct.rs +++ b/src/test/debuginfo/method-on-tuple-struct.rs @@ -113,6 +113,7 @@ // lldb-command:continue +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] struct TupleStruct(int, f64); diff --git a/src/test/debuginfo/recursive-struct.rs b/src/test/debuginfo/recursive-struct.rs index 90c32ad8da1..2cbe9f43789 100644 --- a/src/test/debuginfo/recursive-struct.rs +++ b/src/test/debuginfo/recursive-struct.rs @@ -69,6 +69,7 @@ // gdb-command:continue #![allow(unused_variables)] +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] use self::Opt::{Empty, Val}; diff --git a/src/test/debuginfo/self-in-default-method.rs b/src/test/debuginfo/self-in-default-method.rs index 87884d2f956..a1074e490f7 100644 --- a/src/test/debuginfo/self-in-default-method.rs +++ b/src/test/debuginfo/self-in-default-method.rs @@ -112,6 +112,7 @@ // lldb-check:[...]$14 = -10 // lldb-command:continue +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] struct Struct { diff --git a/src/test/debuginfo/self-in-generic-default-method.rs b/src/test/debuginfo/self-in-generic-default-method.rs index 62b5e6872ee..f0da6e26870 100644 --- a/src/test/debuginfo/self-in-generic-default-method.rs +++ b/src/test/debuginfo/self-in-generic-default-method.rs @@ -112,6 +112,7 @@ // lldb-check:[...]$14 = -10.5 // lldb-command:continue +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] struct Struct { diff --git a/src/test/debuginfo/trait-pointers.rs b/src/test/debuginfo/trait-pointers.rs index 9f8c0aa06e6..b95190f875a 100644 --- a/src/test/debuginfo/trait-pointers.rs +++ b/src/test/debuginfo/trait-pointers.rs @@ -16,6 +16,7 @@ // lldb-command:run #![allow(unused_variables)] +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] trait Trait { diff --git a/src/test/debuginfo/type-names.rs b/src/test/debuginfo/type-names.rs index b508da73f4a..156e5f12ad5 100644 --- a/src/test/debuginfo/type-names.rs +++ b/src/test/debuginfo/type-names.rs @@ -173,6 +173,7 @@ // gdb-command:whatis closure2 // gdb-check:type = struct (closure, usize) +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] use self::Enum1::{Variant1_1, Variant1_2}; diff --git a/src/test/debuginfo/unique-enum.rs b/src/test/debuginfo/unique-enum.rs index 3d028eb1077..08622b2dca8 100644 --- a/src/test/debuginfo/unique-enum.rs +++ b/src/test/debuginfo/unique-enum.rs @@ -42,6 +42,7 @@ // lldb-check:[...]$2 = TheOnlyCase(123234) #![allow(unused_variables)] +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] // The first element is to ensure proper alignment, irrespective of the machines word size. Since diff --git a/src/test/debuginfo/var-captured-in-nested-closure.rs b/src/test/debuginfo/var-captured-in-nested-closure.rs index 3a7fbb9a3a1..d7831c983c0 100644 --- a/src/test/debuginfo/var-captured-in-nested-closure.rs +++ b/src/test/debuginfo/var-captured-in-nested-closure.rs @@ -79,6 +79,7 @@ // lldb-command:continue #![allow(unused_variables)] +#![feature(box_syntax)] #![omit_gdb_pretty_printer_section] struct Struct { diff --git a/src/test/debuginfo/var-captured-in-sendable-closure.rs b/src/test/debuginfo/var-captured-in-sendable-closure.rs index b34749260f3..30a07ea46dd 100644 --- a/src/test/debuginfo/var-captured-in-sendable-closure.rs +++ b/src/test/debuginfo/var-captured-in-sendable-closure.rs @@ -41,7 +41,7 @@ // lldb-check:[...]$2 = 5 #![allow(unused_variables)] -#![feature(unboxed_closures)] +#![feature(unboxed_closures, box_syntax)] #![omit_gdb_pretty_printer_section] struct Struct { diff --git a/src/test/debuginfo/var-captured-in-stack-closure.rs b/src/test/debuginfo/var-captured-in-stack-closure.rs index a743adae51e..9daf6abba11 100644 --- a/src/test/debuginfo/var-captured-in-stack-closure.rs +++ b/src/test/debuginfo/var-captured-in-stack-closure.rs @@ -70,7 +70,7 @@ // lldb-command:print *owned // lldb-check:[...]$9 = 6 -#![feature(unboxed_closures)] +#![feature(unboxed_closures, box_syntax)] #![allow(unused_variables)] #![omit_gdb_pretty_printer_section] diff --git a/src/test/run-make/save-analysis/foo.rs b/src/test/run-make/save-analysis/foo.rs index 61c5312f234..c72d685b311 100644 --- a/src/test/run-make/save-analysis/foo.rs +++ b/src/test/run-make/save-analysis/foo.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 { f: int } diff --git a/src/test/run-pass-valgrind/cleanup-auto-borrow-obj.rs b/src/test/run-pass-valgrind/cleanup-auto-borrow-obj.rs index 5d7dbbe5a29..195055f12d1 100644 --- a/src/test/run-pass-valgrind/cleanup-auto-borrow-obj.rs +++ b/src/test/run-pass-valgrind/cleanup-auto-borrow-obj.rs @@ -13,6 +13,7 @@ // schedule cleanups when auto borrowing trait objects. // This program should be valgrind clean. +#![feature(box_syntax)] static mut DROP_RAN: bool = false; diff --git a/src/test/run-pass-valgrind/dst-dtor-1.rs b/src/test/run-pass-valgrind/dst-dtor-1.rs index 8b8b7f169c5..47e2a18a999 100644 --- a/src/test/run-pass-valgrind/dst-dtor-1.rs +++ b/src/test/run-pass-valgrind/dst-dtor-1.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + static mut DROP_RAN: bool = false; struct Foo; diff --git a/src/test/run-pass-valgrind/dst-dtor-2.rs b/src/test/run-pass-valgrind/dst-dtor-2.rs index 743293c23f6..2c7b89d680a 100644 --- a/src/test/run-pass-valgrind/dst-dtor-2.rs +++ b/src/test/run-pass-valgrind/dst-dtor-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(box_syntax)] + static mut DROP_RAN: int = 0; struct Foo; diff --git a/src/test/compile-fail/syntax-extension-bytes-non-literal.rs b/src/test/run-pass/box-new.rs index 3a2e104818f..168218e1b1e 100644 --- a/src/test/compile-fail/syntax-extension-bytes-non-literal.rs +++ b/src/test/run-pass/box-new.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// 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. // @@ -9,6 +9,5 @@ // except according to those terms. fn main() { - let vec = bytes!(foo); //~ ERROR non-literal in bytes! - //~^ WARN `bytes!` is deprecated + let _a = Box::new(1); } diff --git a/src/test/run-pass/bytes-macro-static.rs b/src/test/run-pass/bytes-macro-static.rs deleted file mode 100644 index 2ce8c40c771..00000000000 --- a/src/test/run-pass/bytes-macro-static.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -static FOO: &'static [u8] = bytes!("hello, world"); - -pub fn main() { - let b: &'static [u8] = match true { - true => bytes!("test"), - false => unreachable!() - }; - - assert_eq!(b, "test".as_bytes()); - assert_eq!(FOO, "hello, world".as_bytes()); -} diff --git a/src/test/run-pass/cfg_attr.rs b/src/test/run-pass/cfg_attr.rs index 15d3f4a04d5..7e508d91c87 100644 --- a/src/test/run-pass/cfg_attr.rs +++ b/src/test/run-pass/cfg_attr.rs @@ -14,37 +14,37 @@ use std::fmt::Show; struct NotShowable; -#[cfg_attr(set1, deriving(Show))] +#[cfg_attr(set1, derive(Show))] struct Set1; -#[cfg_attr(notset, deriving(Show))] +#[cfg_attr(notset, derive(Show))] struct Notset(NotShowable); -#[cfg_attr(not(notset), deriving(Show))] +#[cfg_attr(not(notset), derive(Show))] struct NotNotset; -#[cfg_attr(not(set1), deriving(Show))] +#[cfg_attr(not(set1), derive(Show))] struct NotSet1(NotShowable); -#[cfg_attr(all(set1, set2), deriving(Show))] +#[cfg_attr(all(set1, set2), derive(Show))] struct AllSet1Set2; -#[cfg_attr(all(set1, notset), deriving(Show))] +#[cfg_attr(all(set1, notset), derive(Show))] struct AllSet1Notset(NotShowable); -#[cfg_attr(any(set1, notset), deriving(Show))] +#[cfg_attr(any(set1, notset), derive(Show))] struct AnySet1Notset; -#[cfg_attr(any(notset, notset2), deriving(Show))] +#[cfg_attr(any(notset, notset2), derive(Show))] struct AnyNotsetNotset2(NotShowable); -#[cfg_attr(all(not(notset), any(set1, notset)), deriving(Show))] +#[cfg_attr(all(not(notset), any(set1, notset)), derive(Show))] struct Complex; -#[cfg_attr(any(notset, not(any(set1, notset))), deriving(Show))] +#[cfg_attr(any(notset, not(any(set1, notset))), derive(Show))] struct ComplexNot(NotShowable); -#[cfg_attr(any(target_endian = "little", target_endian = "big"), deriving(Show))] +#[cfg_attr(any(target_endian = "little", target_endian = "big"), derive(Show))] struct KeyValue; fn is_show<T: Show>() {} diff --git a/src/test/run-pass/ext-expand-inner-exprs.rs b/src/test/run-pass/ext-expand-inner-exprs.rs index 1c96cbd9314..d204f808e44 100644 --- a/src/test/run-pass/ext-expand-inner-exprs.rs +++ b/src/test/run-pass/ext-expand-inner-exprs.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -static FOO : &'static [u8] = bytes!(concat!(concat!("hel", "lo"), "world")); +static FOO : &'static str = concat!(concat!("hel", "lo"), "world"); pub fn main() { - assert_eq!(FOO, "helloworld".as_bytes()); + assert_eq!(FOO, "helloworld"); } diff --git a/src/test/run-pass/syntax-extension-bytes.rs b/src/test/run-pass/syntax-extension-bytes.rs deleted file mode 100644 index 1f92677fb6f..00000000000 --- a/src/test/run-pass/syntax-extension-bytes.rs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -static static_vec: &'static [u8] = bytes!("abc", 0xFF, '!'); - -pub fn main() { - let vec: &'static [u8] = bytes!("abc"); - let expected: &[u8] = &[97_u8, 98_u8, 99_u8]; - assert_eq!(vec, expected); - - let vec: &'static [u8] = bytes!("null", 0); - let expected: &[u8] = &[110_u8, 117_u8, 108_u8, 108_u8, 0_u8]; - assert_eq!(vec, expected); - - let vec: &'static [u8] = bytes!(' ', " ", 32, 32u8); - let expected: &[u8] = &[32_u8, 32_u8, 32_u8, 32_u8]; - assert_eq!(vec, expected); - - let expected: &[u8] = &[97_u8, 98_u8, 99_u8, 255_u8, 33_u8]; - assert_eq!(static_vec, expected); -} |
