about summary refs log tree commit diff
path: root/src/libcore/str
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2015-01-28 17:06:46 +1300
committerNick Cameron <ncameron@mozilla.com>2015-01-30 12:01:08 +1300
commitbf2b4738163b196685198e91d7ce4e2761bb718e (patch)
tree84d15b7a762f4b8ef5517d05b5963a448e4d8414 /src/libcore/str
parentc64a96d385fb3b23c6744cf8d927c9c175936b5f (diff)
downloadrust-bf2b4738163b196685198e91d7ce4e2761bb718e.tar.gz
rust-bf2b4738163b196685198e91d7ce4e2761bb718e.zip
Rename FullRange to RangeFull
Diffstat (limited to 'src/libcore/str')
-rw-r--r--src/libcore/str/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index 22851965644..8495a03747e 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -1249,6 +1249,7 @@ mod traits {
         }
     }
 
+    #[cfg(stage0)]
     #[stable(feature = "rust1", since = "1.0.0")]
     impl ops::Index<ops::FullRange> for str {
         type Output = str;
@@ -1257,6 +1258,15 @@ mod traits {
             self
         }
     }
+    #[cfg(not(stage0))]
+    #[stable(feature = "rust1", since = "1.0.0")]
+    impl ops::Index<ops::RangeFull> for str {
+        type Output = str;
+        #[inline]
+        fn index(&self, _index: &ops::RangeFull) -> &str {
+            self
+        }
+    }
 }
 
 /// Any string that can be represented as a slice