Rename FullRange to RangeFull

This commit is contained in:
Nick Cameron 2015-01-28 17:06:46 +13:00
parent c64a96d385
commit bf2b473816
17 changed files with 134 additions and 31 deletions

View file

@ -877,6 +877,7 @@ impl ops::Index<ops::RangeFrom<uint>> for String {
&self[][*index]
}
}
#[cfg(stage0)]
#[stable(feature = "rust1", since = "1.0.0")]
impl ops::Index<ops::FullRange> for String {
type Output = str;
@ -885,6 +886,15 @@ impl ops::Index<ops::FullRange> for String {
unsafe { mem::transmute(self.vec.as_slice()) }
}
}
#[cfg(not(stage0))]
#[stable(feature = "rust1", since = "1.0.0")]
impl ops::Index<ops::RangeFull> for String {
type Output = str;
#[inline]
fn index(&self, _index: &ops::RangeFull) -> &str {
unsafe { mem::transmute(self.vec.as_slice()) }
}
}
#[stable(feature = "rust1", since = "1.0.0")]
impl ops::Deref for String {