Rename FullRange to RangeFull
This commit is contained in:
parent
c64a96d385
commit
bf2b473816
17 changed files with 134 additions and 31 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue