]> git.lizzy.rs Git - rust.git/commitdiff
Put slicing syntax behind a feature gate.
authorNick Cameron <ncameron@mozilla.com>
Fri, 26 Sep 2014 05:48:16 +0000 (17:48 +1200)
committerNick Cameron <ncameron@mozilla.com>
Thu, 2 Oct 2014 00:23:36 +0000 (13:23 +1300)
[breaking-change]

If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.

43 files changed:
src/compiletest/compiletest.rs
src/doc/reference.md
src/libcollections/lib.rs
src/libcollections/slice.rs
src/libcollections/string.rs
src/libcore/lib.rs
src/libcore/ops.rs
src/libcore/slice.rs
src/libcoretest/lib.rs
src/libnative/lib.rs
src/libnum/lib.rs
src/librbml/lib.rs
src/libregex/lib.rs
src/librustc/lib.rs
src/librustc_back/lib.rs
src/librustdoc/lib.rs
src/librustrt/lib.rs
src/libserialize/lib.rs
src/libstd/io/net/udp.rs
src/libstd/lib.rs
src/libsyntax/feature_gate.rs
src/libsyntax/lib.rs
src/libterm/lib.rs
src/test/bench/shootout-fannkuch-redux.rs
src/test/bench/shootout-fasta-redux.rs
src/test/bench/shootout-fasta.rs
src/test/bench/shootout-k-nucleotide-pipes.rs
src/test/bench/shootout-k-nucleotide.rs
src/test/bench/shootout-regex-dna.rs
src/test/bench/shootout-reverse-complement.rs
src/test/compile-fail/issue-15730.rs
src/test/compile-fail/slice-2.rs
src/test/compile-fail/slice-borrow.rs
src/test/compile-fail/slice-mut-2.rs
src/test/compile-fail/slice-mut.rs
src/test/debuginfo/vec-slices.rs
src/test/run-pass/issue-3888-2.rs
src/test/run-pass/issue-4464.rs
src/test/run-pass/issue-8898.rs
src/test/run-pass/slice-2.rs
src/test/run-pass/slice-fail-1.rs
src/test/run-pass/slice-fail-2.rs
src/test/run-pass/slice.rs

index 0a486ef03055606620796c1317764a08dec24cfe..1e5e3ebdb3410e531a5e3fe951dfe2752c76447c 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 #![crate_type = "bin"]
-#![feature(phase)]
+#![feature(phase, slicing_syntax)]
 
 #![deny(warnings)]
 
index 3da3d4c580755e6a0fb0a2bbb434ff169b355366..c3b61f6435c493b4f7de4dea15b5f64b8f78d8a0 100644 (file)
@@ -3828,7 +3828,7 @@ type signature of `print`, and the cast expression in `main`.
 Within the body of an item that has type parameter declarations, the names of
 its type parameters are types:
 
-```
+```ignore
 fn map<A: Clone, B: Clone>(f: |A| -> B, xs: &[A]) -> Vec<B> {
     if xs.len() == 0 {
        return vec![];
index 8b9a0ec796e27eba11ba9bd161a72cfdc7a35cdd..4d0aaf8390707bfd847ed7d1431da1b6c4be961c 100644 (file)
@@ -19,8 +19,9 @@
        html_root_url = "http://doc.rust-lang.org/master/",
        html_playground_url = "http://play.rust-lang.org/")]
 
+#![allow(unknown_features)]
 #![feature(macro_rules, managed_boxes, default_type_params, phase, globs)]
-#![feature(unsafe_destructor, import_shadowing)]
+#![feature(unsafe_destructor, import_shadowing, slicing_syntax)]
 #![no_std]
 
 #[phase(plugin, link)] extern crate core;
index 9cd0161791658e18c9ef17fe0f05dd0e3d95ddc8..60692ceb401bccccf8b45179bd790ed51c7086ad 100644 (file)
 //! interval `[a, b)`:
 //!
 //! ```rust
-//! let numbers = [0i, 1i, 2i];
-//! let last_numbers = numbers[1..3];
-//! // last_numbers is now &[1i, 2i]
+//! #![feature(slicing_syntax)]
+//! fn main() {
+//!     let numbers = [0i, 1i, 2i];
+//!     let last_numbers = numbers[1..3];
+//!     // last_numbers is now &[1i, 2i]
+//! }
 //! ```
 //!
 //! ## Implementations of other traits
index 31bd377a8dedf137fde4f2a1a90012324f32eb52..206e392f6644b8af244db3b4adad2d5fe7019f9e 100644 (file)
@@ -160,7 +160,7 @@ fn safe_get(xs: &[u8], i: uint, total: uint) -> u8 {
 
         if i > 0 {
             unsafe {
-                res.as_mut_vec().push_all(v.[..i])
+                res.as_mut_vec().push_all(v[..i])
             };
         }
 
@@ -177,7 +177,7 @@ fn safe_get(xs: &[u8], i: uint, total: uint) -> u8 {
             macro_rules! error(() => ({
                 unsafe {
                     if subseqidx != i_ {
-                        res.as_mut_vec().push_all(vv[subseqidx..i_]);
+                        res.as_mut_vec().push_all(v[subseqidx..i_]);
                     }
                     subseqidx = i;
                     res.as_mut_vec().push_all(REPLACEMENT);
index 7e2ea492d4ccfc77e1506374adae623b38809270..4890dc2bb739350585255f97f93568d05dde091c 100644 (file)
@@ -57,8 +57,9 @@
        html_playground_url = "http://play.rust-lang.org/")]
 
 #![no_std]
+#![allow(unknown_features)]
 #![feature(globs, intrinsics, lang_items, macro_rules, managed_boxes, phase)]
-#![feature(simd, unsafe_destructor)]
+#![feature(simd, unsafe_destructor, slicing_syntax)]
 #![deny(missing_doc)]
 
 mod macros;
index 77cee2b9863460de55d6da1bb73ef89ee175807c..422c496995b5ec243859adb30229411c6adb0ba5 100644 (file)
@@ -684,7 +684,7 @@ pub trait IndexMut<Index, Result> {
  * A trivial implementation of `Slice`. When `Foo[..Foo]` happens, it ends up
  * calling `slice_to`, and therefore, `main` prints `Slicing!`.
  *
- * ```
+ * ```ignore
  * struct Foo;
  *
  * impl ::core::ops::Slice<Foo, Foo> for Foo {
@@ -749,7 +749,7 @@ pub trait Slice<Idx, Sized? Result> for Sized? {
  * A trivial implementation of `SliceMut`. When `Foo[Foo..]` happens, it ends up
  * calling `slice_from_mut`, and therefore, `main` prints `Slicing!`.
  *
- * ```
+ * ```ignore
  * struct Foo;
  *
  * impl ::core::ops::SliceMut<Foo, Foo> for Foo {
@@ -771,7 +771,7 @@ pub trait Slice<Idx, Sized? Result> for Sized? {
  *     }
  * }
  *
- * fn main() {
+ * pub fn main() {
  *     Foo[mut Foo..];
  * }
  * ```
index 68b3a3199df5787347cb91195148118017cbbf6f..2ff0fd2ef004e90736f1fc8ba1f11b8cdc979ba1 100644 (file)
@@ -814,13 +814,13 @@ fn head_mut(self) -> Option<&'a mut T> {
     #[inline]
     fn tail_mut(self) -> &'a mut [T] {
         let len = self.len();
-        self.slice_mut(1, len)
+        self[mut 1..len]
     }
 
     #[inline]
     fn init_mut(self) -> &'a mut [T] {
         let len = self.len();
-        self.slice_mut(0, len - 1)
+        self[mut 0..len - 1]
     }
 
     #[inline]
index 7866d2f4a111ca75ad997df8d978ace23650ecef..5f31ed35f1b60f6d69767027d3174d7ec5466454 100644 (file)
@@ -7,7 +7,7 @@
 // <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.
-#![feature(globs, unsafe_destructor, macro_rules)]
+#![feature(globs, unsafe_destructor, macro_rules, slicing_syntax)]
 
 extern crate core;
 extern crate test;
index 267ff3d2a81742542cd3ee61c5538d6635042b35..5def99d8ef34eafaa14d3e5ef96a15a66acc2bc3 100644 (file)
@@ -57,7 +57,8 @@
 
 #![deny(unused_result, unused_must_use)]
 #![allow(non_camel_case_types, deprecated)]
-#![feature(default_type_params, lang_items)]
+#![allow(unknown_features)]
+#![feature(default_type_params, lang_items, slicing_syntax)]
 
 // NB this crate explicitly does *not* allow glob imports, please seriously
 //    consider whether they're needed before adding that feature here (the
index 17071d22deed82d555045324c4ee01e2c285c158..fa41cf371129c286b3f7088afaf4357f7efe92e1 100644 (file)
@@ -43,7 +43,8 @@
 //!
 //! [newt]: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
 
-#![feature(macro_rules)]
+#![allow(unknown_features)]
+#![feature(macro_rules, slicing_syntax)]
 #![feature(default_type_params)]
 
 #![crate_name = "num"]
index fa327fb3b4c5d14f4fa232b672746b46dbc35190..7480cf320cff2cda3978c952a6ed768f0d0bdf35 100644 (file)
@@ -24,7 +24,8 @@
        html_favicon_url = "http://www.rust-lang.org/favicon.ico",
        html_root_url = "http://doc.rust-lang.org/master/",
        html_playground_url = "http://play.rust-lang.org/")]
-#![feature(macro_rules, phase)]
+#![allow(unknown_features)]
+#![feature(macro_rules, phase, slicing_syntax)]
 #![allow(missing_doc)]
 
 extern crate serialize;
index 9ff65fe3e2ad79a1b9a6fe31ee50b5d09a8c4c1e..fdfd8c1eae25c7dc3426b212b6a41252cc344525 100644 (file)
        html_root_url = "http://doc.rust-lang.org/master/",
        html_playground_url = "http://play.rust-lang.org/")]
 
-#![feature(macro_rules, phase)]
+#![allow(unknown_features)]
+#![feature(macro_rules, phase, slicing_syntax)]
 #![deny(missing_doc)]
 
 #[cfg(test)]
index be3867eaba2fafef2851bdf13cb386d048e3081a..478aa6d9805be44f2825faa9b75ac74b1cd723f1 100644 (file)
@@ -29,8 +29,9 @@
       html_root_url = "http://doc.rust-lang.org/master/")]
 
 #![allow(deprecated)]
+#![allow(unknown_features)]
 #![feature(macro_rules, globs, struct_variant, quote)]
-#![feature(default_type_params, phase, unsafe_destructor)]
+#![feature(default_type_params, phase, unsafe_destructor, slicing_syntax)]
 
 #![feature(rustc_diagnostic_macros)]
 #![feature(import_shadowing)]
index e48f9df75648f75fab9f982c68825d5a8bb2c29d..6486442deb8d8cb7b33760b7e61d5f7db70fe01f 100644 (file)
@@ -31,7 +31,8 @@
       html_favicon_url = "http://www.rust-lang.org/favicon.ico",
       html_root_url = "http://doc.rust-lang.org/")]
 
-#![feature(globs, phase, macro_rules)]
+#![allow(unknown_features)]
+#![feature(globs, phase, macro_rules, slicing_syntax)]
 
 #[phase(plugin, link)]
 extern crate log;
index 71d00e50af83d20ab900305b78741fb5955c8988..b46d8727b69d01a5b57c80a0dd2c7c71acbe979e 100644 (file)
@@ -15,7 +15,8 @@
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 
-#![feature(globs, struct_variant, managed_boxes, macro_rules, phase)]
+#![allow(unknown_features)]
+#![feature(globs, struct_variant, managed_boxes, macro_rules, phase, slicing_syntax)]
 
 extern crate arena;
 extern crate debug;
index 72c7d89a3b98b701c007b106436e088bc8ce6d9c..1183b14fb4e16d16b1699e18fa7311655d47b9b8 100644 (file)
        html_favicon_url = "http://www.rust-lang.org/favicon.ico",
        html_root_url = "http://doc.rust-lang.org/master/")]
 
+#![allow(unknown_features)]
 #![feature(macro_rules, phase, globs, thread_local, managed_boxes, asm)]
 #![feature(linkage, lang_items, unsafe_destructor, default_type_params)]
-#![feature(import_shadowing)]
+#![feature(import_shadowing, slicing_syntax)]
 #![no_std]
 #![experimental]
 
index 5c35ad8523382cef363099662becabdac6c3a677..8c2f323532235a224eab136bc1281dadc8ae9025 100644 (file)
@@ -23,7 +23,8 @@
        html_favicon_url = "http://www.rust-lang.org/favicon.ico",
        html_root_url = "http://doc.rust-lang.org/master/",
        html_playground_url = "http://play.rust-lang.org/")]
-#![feature(macro_rules, managed_boxes, default_type_params, phase)]
+#![allow(unknown_features)]
+#![feature(macro_rules, managed_boxes, default_type_params, phase, slicing_syntax)]
 
 // test harness access
 #[cfg(test)]
index 4dd6f448ee504dd6f94030306c0874280c01210f..b8fb187548c652ed8830e1acf1964d308b68c22d 100644 (file)
 ///
 /// ```rust,no_run
 /// # #![allow(unused_must_use)]
+/// #![feature(slicing_syntax)]
+///
 /// use std::io::net::udp::UdpSocket;
 /// use std::io::net::ip::{Ipv4Addr, SocketAddr};
+/// fn main() {
+///     let addr = SocketAddr { ip: Ipv4Addr(127, 0, 0, 1), port: 34254 };
+///     let mut socket = match UdpSocket::bind(addr) {
+///         Ok(s) => s,
+///         Err(e) => fail!("couldn't bind socket: {}", e),
+///     };
 ///
-/// let addr = SocketAddr { ip: Ipv4Addr(127, 0, 0, 1), port: 34254 };
-/// let mut socket = match UdpSocket::bind(addr) {
-///     Ok(s) => s,
-///     Err(e) => fail!("couldn't bind socket: {}", e),
-/// };
-///
-/// let mut buf = [0, ..10];
-/// match socket.recv_from(buf) {
-///     Ok((amt, src)) => {
-///         // Send a reply to the socket we received data from
-///         let buf = buf[mut ..amt];
-///         buf.reverse();
-///         socket.send_to(buf, src);
+///     let mut buf = [0, ..10];
+///     match socket.recv_from(buf) {
+///         Ok((amt, src)) => {
+///             // Send a reply to the socket we received data from
+///             let buf = buf[mut ..amt];
+///             buf.reverse();
+///             socket.send_to(buf, src);
+///         }
+///         Err(e) => println!("couldn't receive a datagram: {}", e)
 ///     }
-///     Err(e) => println!("couldn't receive a datagram: {}", e)
+///     drop(socket); // close the socket
 /// }
-/// drop(socket); // close the socket
 /// ```
 pub struct UdpSocket {
     obj: Box<RtioUdpSocket + Send>,
index 7304871cf214c5447389c1166c4015f5a788de90..82de55efad603ae53342a5de31bf58634208c6e2 100644 (file)
        html_root_url = "http://doc.rust-lang.org/master/",
        html_playground_url = "http://play.rust-lang.org/")]
 
+#![allow(unknown_features)]
 #![feature(macro_rules, globs, managed_boxes, linkage)]
 #![feature(default_type_params, phase, lang_items, unsafe_destructor)]
-#![feature(import_shadowing)]
+#![feature(import_shadowing, slicing_syntax)]
 
 // Don't link to std. We are std.
 #![no_std]
index ca6d488772c613b520e641fb0f7887c63250c577..38de2a9c284f09fe3a9abfbb7a4b177febb6bb9e 100644 (file)
@@ -70,6 +70,7 @@
     ("tuple_indexing", Active),
     ("associated_types", Active),
     ("visible_private_types", Active),
+    ("slicing_syntax", Active),
 
     ("if_let", Active),
 
@@ -362,6 +363,11 @@ fn visit_expr(&mut self, e: &ast::Expr) {
                 self.gate_feature("if_let", e.span,
                                   "`if let` syntax is experimental");
             }
+            ast::ExprSlice(..) => {
+                self.gate_feature("slicing_syntax",
+                                  e.span,
+                                  "slicing syntax is experimental");
+            }
             _ => {}
         }
         visit::walk_expr(self, e);
index a42715441465470b6516b5392e10f0e8bd31bd0a..64dedd4592397f06b755a834f534ea89f1d62604 100644 (file)
@@ -23,7 +23,8 @@
        html_favicon_url = "http://www.rust-lang.org/favicon.ico",
        html_root_url = "http://doc.rust-lang.org/master/")]
 
-#![feature(macro_rules, globs, default_type_params, phase)]
+#![allow(unknown_features)]
+#![feature(macro_rules, globs, default_type_params, phase, slicing_syntax)]
 #![feature(quote, struct_variant, unsafe_destructor, import_shadowing)]
 #![allow(deprecated)]
 
index 3fc631422d5f3a3e78cba2a5400ca0119f83c635..b05e0a4bff398595bf045392da5a07775b3c7f0c 100644 (file)
@@ -49,7 +49,8 @@
        html_root_url = "http://doc.rust-lang.org/master/",
        html_playground_url = "http://play.rust-lang.org/")]
 
-#![feature(macro_rules, phase)]
+#![allow(unknown_features)]
+#![feature(macro_rules, phase, slicing_syntax)]
 
 #![deny(missing_doc)]
 
index 1260cc33725f592b27b9c3d789997d401db293af..b4292c2b050331ea5eaba7abce3fbc1f7082aa73 100644 (file)
@@ -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;
 
index 3f8c929aecf89440d30cd722e5e30b8e7f7cd745..b8af76ce17cecf879ffb01980cbf8873656e76e3 100644 (file)
@@ -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;
index ed8ddcaa0ed5fd1f1c7dfdb9d625f351372219fe..7565525bc8cc00f7c498955d60a12abad58f8171 100644 (file)
@@ -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;
index 80d623bbeb1247043337b3a1b318381d8d222ef3..86c1bd82e9f9c8fbfdfef7090373f2fae198864b 100644 (file)
@@ -13,6 +13,8 @@
 
 // multi tasking k-nucleotide
 
+#![feature(slicing_syntax)]
+
 extern crate collections;
 
 use std::collections::HashMap;
index 70fd937d2a388eb8283f46e25161f4f944dc68db..8c08fc4caa1d88b24d60622e90bd4711f93aaf1a 100644 (file)
@@ -40,6 +40,8 @@
 
 // ignore-android see #10393 #13206
 
+#![feature(slicing_syntax)]
+
 use std::string::String;
 use std::slice;
 use std::sync::{Arc, Future};
index 0adb80c2689ba64a360700768729bb8738bfdbf6..dccdafe9cf832d07c240661ccc28fdb3db539168 100644 (file)
@@ -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;
index e5f22a3d07c2cf12a90dcb1486906acee43ed14c..e3fa6334f77cc55ad075898ffe79f847752617eb 100644 (file)
@@ -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};
 
index fc8c4e36075fa6c8ba6274ac9d36ed8e5dcc29a8..c29e74af03cd2f17bade2f1e5a4aae4070ce1ba2 100644 (file)
@@ -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
index fbfc438321c8e4ab22dea549b83bc52af85cb958..63f79c808ae22e575e8ea6db54ea7be1343e6852 100644 (file)
@@ -10,6 +10,8 @@
 
 // Test that slicing syntax gives errors if we have not implemented the trait.
 
+#![feature(slicing_syntax)]
+
 struct Foo;
 
 fn main() {
index 3d12511134fa003d869babf982460a1a79ff9ea3..00783b71ea11da2c12f7ca2548e7dccfe09b44fe 100644 (file)
@@ -10,6 +10,8 @@
 
 // Test slicing expressions doesn't defeat the borrow checker.
 
+#![feature(slicing_syntax)]
+
 fn main() {
     let y;
     {
index 1176b637cece091337be1faa8eceef0644442c63..09019448a6786e8dd3f68485a287cbfe0047f894 100644 (file)
@@ -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
index 8cd7c4ed0bb077d4808c382fa5c3df76807fe454..cbfa3ed85fd6c8f59b6f0b1134902a3ecc29d096 100644 (file)
@@ -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.
index 392a025b1f0bc31bb0d405d59eb09fa4b3ebe537..67e621fe556202bd0f588bb417b8480532beba4f 100644 (file)
@@ -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,
index 2062967361906e89c7e291d13299f7c679a8bb8b..10add853ee7f3bc2fcf8513dab64415dd05da36f 100644 (file)
@@ -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]
 }
index 0f3f9149536764beb2fcb9bf5225fabb1eeaa6af..f2c1a715b514b959ed238dea4c5d4519165a064d 100644 (file)
@@ -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() {}
index 1838f34a9ab8b670f71d77b9cf016a9c4aa3773c..f2dcaa4a31eaa2bdd29be934c815089ec780a394 100644 (file)
@@ -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;
 
index 3c0933a055cba7e788d85cadfecbb85327f43da4..768c28cb8ded72533b138f460a50f379c1af5866 100644 (file)
@@ -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];
index f6972023a72a5830653b58c5adf5d429951fce83..b07cf59596852250647308a68278d173afe3e5f4 100644 (file)
@@ -10,6 +10,8 @@
 
 // Test that is a slicing expr[..] fails, the correct cleanups happen.
 
+#![feature(slicing_syntax)]
+
 use std::task;
 
 struct Foo;
index cbe65fcd83d2dcaa1c44c4fd487e5b5e52049e11..a2aecc1d5cd56e3b62d415006d7e2634ceedbe18 100644 (file)
@@ -10,6 +10,8 @@
 
 // Test that is a slicing expr[..] fails, the correct cleanups happen.
 
+#![feature(slicing_syntax)]
+
 use std::task;
 
 struct Foo;
index 661ff055dc289b9253f8672fc92bf24c2cf34b08..2b4251b40891f7cdc1dadbabd0f2378d7471e510 100644 (file)
@@ -10,6 +10,8 @@
 
 // Test slicing sugar.
 
+#![feature(slicing_syntax)]
+
 extern crate core;
 use core::ops::{Slice,SliceMut};