about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2014-10-02 11:47:51 -0700
committerAaron Turon <aturon@mozilla.com>2014-10-02 11:47:51 -0700
commit7bf56df4c8bf40a16f2743447b7688343642f370 (patch)
treea3854d324e66cf84cc78d1a89faff4a6265a9058 /src/libcore
parent2f365ffdad40475e8f70f7af7f210d6c597b60f5 (diff)
downloadrust-7bf56df4c8bf40a16f2743447b7688343642f370.tar.gz
rust-7bf56df4c8bf40a16f2743447b7688343642f370.zip
Revert "Put slicing syntax behind a feature gate."
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/lib.rs3
-rw-r--r--src/libcore/ops.rs6
-rw-r--r--src/libcore/slice.rs4
3 files changed, 6 insertions, 7 deletions
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 4890dc2bb73..7e2ea492d4c 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -57,9 +57,8 @@
        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, slicing_syntax)]
+#![feature(simd, unsafe_destructor)]
 #![deny(missing_doc)]
 
 mod macros;
diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs
index 422c496995b..77cee2b9863 100644
--- a/src/libcore/ops.rs
+++ b/src/libcore/ops.rs
@@ -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? {
  *     }
  * }
  *
- * pub fn main() {
+ * fn main() {
  *     Foo[mut Foo..];
  * }
  * ```
diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs
index 2ff0fd2ef00..68b3a3199df 100644
--- a/src/libcore/slice.rs
+++ b/src/libcore/slice.rs
@@ -814,13 +814,13 @@ impl<'a,T> MutableSlice<'a, T> for &'a mut [T] {
     #[inline]
     fn tail_mut(self) -> &'a mut [T] {
         let len = self.len();
-        self[mut 1..len]
+        self.slice_mut(1, len)
     }
 
     #[inline]
     fn init_mut(self) -> &'a mut [T] {
         let len = self.len();
-        self[mut 0..len - 1]
+        self.slice_mut(0, len - 1)
     }
 
     #[inline]