diff options
Diffstat (limited to 'src/libcore/str')
| -rw-r--r-- | src/libcore/str/mod.rs | 10 |
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 |
