diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2014-09-26 17:48:16 +1200 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2014-10-02 13:23:36 +1300 |
| commit | 95cfc35607ccf5f02f02de56a35a9ef50fa23a82 (patch) | |
| tree | 85cb0f79ec42469ac7203cdcc09ffee5247cded7 /src/test | |
| parent | df2f1fa7680a86ba228f004e7de731e91a1df1fe (diff) | |
| download | rust-95cfc35607ccf5f02f02de56a35a9ef50fa23a82.tar.gz rust-95cfc35607ccf5f02f02de56a35a9ef50fa23a82.zip | |
Put slicing syntax behind a feature gate.
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/bench/shootout-fannkuch-redux.rs | 2 | ||||
| -rw-r--r-- | src/test/bench/shootout-fasta-redux.rs | 2 | ||||
| -rw-r--r-- | src/test/bench/shootout-fasta.rs | 2 | ||||
| -rw-r--r-- | src/test/bench/shootout-k-nucleotide-pipes.rs | 2 | ||||
| -rw-r--r-- | src/test/bench/shootout-k-nucleotide.rs | 2 | ||||
| -rw-r--r-- | src/test/bench/shootout-regex-dna.rs | 2 | ||||
| -rw-r--r-- | src/test/bench/shootout-reverse-complement.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-15730.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/slice-2.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/slice-borrow.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/slice-mut-2.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/slice-mut.rs | 2 | ||||
| -rw-r--r-- | src/test/debuginfo/vec-slices.rs | 1 | ||||
| -rw-r--r-- | src/test/run-pass/issue-3888-2.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/issue-4464.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/issue-8898.rs | 1 | ||||
| -rw-r--r-- | src/test/run-pass/slice-2.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/slice-fail-1.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/slice-fail-2.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/slice.rs | 2 |
20 files changed, 37 insertions, 1 deletions
diff --git a/src/test/bench/shootout-fannkuch-redux.rs b/src/test/bench/shootout-fannkuch-redux.rs index 1260cc33725..b4292c2b050 100644 --- a/src/test/bench/shootout-fannkuch-redux.rs +++ b/src/test/bench/shootout-fannkuch-redux.rs @@ -38,6 +38,8 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // OF THE POSSIBILITY OF SUCH DAMAGE. +#![feature(slicing_syntax)] + use std::{cmp, iter, mem}; use std::sync::Future; diff --git a/src/test/bench/shootout-fasta-redux.rs b/src/test/bench/shootout-fasta-redux.rs index 3f8c929aecf..b8af76ce17c 100644 --- a/src/test/bench/shootout-fasta-redux.rs +++ b/src/test/bench/shootout-fasta-redux.rs @@ -38,6 +38,8 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // OF THE POSSIBILITY OF SUCH DAMAGE. +#![feature(slicing_syntax)] + use std::cmp::min; use std::io::{stdout, IoResult}; use std::os; diff --git a/src/test/bench/shootout-fasta.rs b/src/test/bench/shootout-fasta.rs index ed8ddcaa0ed..7565525bc8c 100644 --- a/src/test/bench/shootout-fasta.rs +++ b/src/test/bench/shootout-fasta.rs @@ -38,6 +38,8 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // OF THE POSSIBILITY OF SUCH DAMAGE. +#![feature(slicing_syntax)] + use std::io; use std::io::{BufferedWriter, File}; use std::cmp::min; diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs index 80d623bbeb1..86c1bd82e9f 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(slicing_syntax)] + extern crate collections; use std::collections::HashMap; diff --git a/src/test/bench/shootout-k-nucleotide.rs b/src/test/bench/shootout-k-nucleotide.rs index 70fd937d2a3..8c08fc4caa1 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(slicing_syntax)] + use std::string::String; use std::slice; use std::sync::{Arc, Future}; diff --git a/src/test/bench/shootout-regex-dna.rs b/src/test/bench/shootout-regex-dna.rs index 0adb80c2689..dccdafe9cf8 100644 --- a/src/test/bench/shootout-regex-dna.rs +++ b/src/test/bench/shootout-regex-dna.rs @@ -41,7 +41,7 @@ // ignore-stage1 // ignore-cross-compile #12102 -#![feature(macro_rules, phase)] +#![feature(macro_rules, phase, slicing_syntax)] extern crate regex; #[phase(plugin)]extern crate regex_macros; diff --git a/src/test/bench/shootout-reverse-complement.rs b/src/test/bench/shootout-reverse-complement.rs index e5f22a3d07c..e3fa6334f77 100644 --- a/src/test/bench/shootout-reverse-complement.rs +++ b/src/test/bench/shootout-reverse-complement.rs @@ -41,6 +41,8 @@ // ignore-pretty very bad with line comments // ignore-android doesn't terminate? +#![feature(slicing_syntax)] + use std::iter::range_step; use std::io::{stdin, stdout, File}; diff --git a/src/test/compile-fail/issue-15730.rs b/src/test/compile-fail/issue-15730.rs index fc8c4e36075..c29e74af03c 100644 --- a/src/test/compile-fail/issue-15730.rs +++ b/src/test/compile-fail/issue-15730.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(slicing_syntax)] + fn main() { let mut array = [1, 2, 3]; //~^ ERROR cannot determine a type for this local variable: cannot determine the type of this integ diff --git a/src/test/compile-fail/slice-2.rs b/src/test/compile-fail/slice-2.rs index fbfc438321c..63f79c808ae 100644 --- a/src/test/compile-fail/slice-2.rs +++ b/src/test/compile-fail/slice-2.rs @@ -10,6 +10,8 @@ // Test that slicing syntax gives errors if we have not implemented the trait. +#![feature(slicing_syntax)] + struct Foo; fn main() { diff --git a/src/test/compile-fail/slice-borrow.rs b/src/test/compile-fail/slice-borrow.rs index 3d12511134f..00783b71ea1 100644 --- a/src/test/compile-fail/slice-borrow.rs +++ b/src/test/compile-fail/slice-borrow.rs @@ -10,6 +10,8 @@ // Test slicing expressions doesn't defeat the borrow checker. +#![feature(slicing_syntax)] + fn main() { let y; { diff --git a/src/test/compile-fail/slice-mut-2.rs b/src/test/compile-fail/slice-mut-2.rs index 1176b637cec..09019448a67 100644 --- a/src/test/compile-fail/slice-mut-2.rs +++ b/src/test/compile-fail/slice-mut-2.rs @@ -10,6 +10,8 @@ // Test mutability and slicing syntax. +#![feature(slicing_syntax)] + fn main() { let x: &[int] = &[1, 2, 3, 4, 5]; // Can't mutably slice an immutable slice diff --git a/src/test/compile-fail/slice-mut.rs b/src/test/compile-fail/slice-mut.rs index 8cd7c4ed0bb..cbfa3ed85fd 100644 --- a/src/test/compile-fail/slice-mut.rs +++ b/src/test/compile-fail/slice-mut.rs @@ -10,6 +10,8 @@ // Test mutability and slicing syntax. +#![feature(slicing_syntax)] + fn main() { let x: &[int] = &[1, 2, 3, 4, 5]; // Immutable slices are not mutable. diff --git a/src/test/debuginfo/vec-slices.rs b/src/test/debuginfo/vec-slices.rs index 392a025b1f0..67e621fe556 100644 --- a/src/test/debuginfo/vec-slices.rs +++ b/src/test/debuginfo/vec-slices.rs @@ -80,6 +80,7 @@ // lldb-check:[...]$5 = &[AStruct { x: 10, y: 11, z: 12 }, AStruct { x: 13, y: 14, z: 15 }] #![allow(unused_variable)] +#![feature(slicing_syntax)] struct AStruct { x: i16, diff --git a/src/test/run-pass/issue-3888-2.rs b/src/test/run-pass/issue-3888-2.rs index 20629673619..10add853ee7 100644 --- a/src/test/run-pass/issue-3888-2.rs +++ b/src/test/run-pass/issue-3888-2.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(slicing_syntax)] + fn vec_peek<'r, T>(v: &'r [T]) -> &'r [T] { v[1..5] } diff --git a/src/test/run-pass/issue-4464.rs b/src/test/run-pass/issue-4464.rs index 0f3f9149536..f2c1a715b51 100644 --- a/src/test/run-pass/issue-4464.rs +++ b/src/test/run-pass/issue-4464.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(slicing_syntax)] + fn broken(v: &[u8], i: uint, j: uint) -> &[u8] { v[i..j] } pub fn main() {} diff --git a/src/test/run-pass/issue-8898.rs b/src/test/run-pass/issue-8898.rs index 1838f34a9ab..f2dcaa4a31e 100644 --- a/src/test/run-pass/issue-8898.rs +++ b/src/test/run-pass/issue-8898.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(slicing_syntax)] extern crate debug; diff --git a/src/test/run-pass/slice-2.rs b/src/test/run-pass/slice-2.rs index 3c0933a055c..768c28cb8de 100644 --- a/src/test/run-pass/slice-2.rs +++ b/src/test/run-pass/slice-2.rs @@ -10,6 +10,8 @@ // Test slicing expressions on slices and Vecs. +#![feature(slicing_syntax)] + fn main() { let x: &[int] = &[1, 2, 3, 4, 5]; let cmp: &[int] = &[1, 2, 3, 4, 5]; diff --git a/src/test/run-pass/slice-fail-1.rs b/src/test/run-pass/slice-fail-1.rs index f6972023a72..b07cf595968 100644 --- a/src/test/run-pass/slice-fail-1.rs +++ b/src/test/run-pass/slice-fail-1.rs @@ -10,6 +10,8 @@ // Test that is a slicing expr[..] fails, the correct cleanups happen. +#![feature(slicing_syntax)] + use std::task; struct Foo; diff --git a/src/test/run-pass/slice-fail-2.rs b/src/test/run-pass/slice-fail-2.rs index cbe65fcd83d..a2aecc1d5cd 100644 --- a/src/test/run-pass/slice-fail-2.rs +++ b/src/test/run-pass/slice-fail-2.rs @@ -10,6 +10,8 @@ // Test that is a slicing expr[..] fails, the correct cleanups happen. +#![feature(slicing_syntax)] + use std::task; struct Foo; diff --git a/src/test/run-pass/slice.rs b/src/test/run-pass/slice.rs index 661ff055dc2..2b4251b4089 100644 --- a/src/test/run-pass/slice.rs +++ b/src/test/run-pass/slice.rs @@ -10,6 +10,8 @@ // Test slicing sugar. +#![feature(slicing_syntax)] + extern crate core; use core::ops::{Slice,SliceMut}; |
