about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-10-02 23:42:31 +0000
committerbors <bors@rust-lang.org>2014-10-02 23:42:31 +0000
commitd0af3feebb57bc58c52de69ab51f92dc7082500b (patch)
treed39de6be5866c0f0f37f9f3219b8217c873d8b52 /src/test/compile-fail
parentb2d4eb186e99b66051be9089f836c66a558dd995 (diff)
parentd2ea0315e09cbd495a67c9e3d5053b57e2b5a8b7 (diff)
downloadrust-d0af3feebb57bc58c52de69ab51f92dc7082500b.tar.gz
rust-d0af3feebb57bc58c52de69ab51f92dc7082500b.zip
auto merge of #17715 : aturon/rust/revert-slice-ops-libs, r=alexcrichton
This PR reverts https://github.com/rust-lang/rust/pull/17620, which caused a significant regression for slices.

As discussed with @alexcrichton, all of the public-facing changes of the earlier PR need to be rolled back, and it's not clear that we should move the libraries over to this new notation yet anyway (especially given its feature-gated status).

Closes #17710
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/issue-15730.rs4
-rw-r--r--src/test/compile-fail/slice-2.rs2
-rw-r--r--src/test/compile-fail/slice-borrow.rs2
-rw-r--r--src/test/compile-fail/slice-mut-2.rs2
-rw-r--r--src/test/compile-fail/slice-mut.rs2
5 files changed, 1 insertions, 11 deletions
diff --git a/src/test/compile-fail/issue-15730.rs b/src/test/compile-fail/issue-15730.rs
index c29e74af03c..6cddd8ee939 100644
--- a/src/test/compile-fail/issue-15730.rs
+++ b/src/test/compile-fail/issue-15730.rs
@@ -8,10 +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
-    let pie_slice = array[1..2];
+    let pie_slice = array.slice(1, 2);
 }
diff --git a/src/test/compile-fail/slice-2.rs b/src/test/compile-fail/slice-2.rs
index 63f79c808ae..fbfc438321c 100644
--- a/src/test/compile-fail/slice-2.rs
+++ b/src/test/compile-fail/slice-2.rs
@@ -10,8 +10,6 @@
 
 // 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 00783b71ea1..3d12511134f 100644
--- a/src/test/compile-fail/slice-borrow.rs
+++ b/src/test/compile-fail/slice-borrow.rs
@@ -10,8 +10,6 @@
 
 // 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 09019448a67..1176b637cec 100644
--- a/src/test/compile-fail/slice-mut-2.rs
+++ b/src/test/compile-fail/slice-mut-2.rs
@@ -10,8 +10,6 @@
 
 // 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 cbfa3ed85fd..8cd7c4ed0bb 100644
--- a/src/test/compile-fail/slice-mut.rs
+++ b/src/test/compile-fail/slice-mut.rs
@@ -10,8 +10,6 @@
 
 // Test mutability and slicing syntax.
 
-#![feature(slicing_syntax)]
-
 fn main() {
     let x: &[int] = &[1, 2, 3, 4, 5];
     // Immutable slices are not mutable.