diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-04-17 14:49:49 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-04-21 11:37:34 -0700 |
| commit | 69ded69d630e9f908aa0cf65dba124a9eb9d6eb7 (patch) | |
| tree | f955152df5b416fa729208186a26b503f43417ef /src/libcollections | |
| parent | 7397bdc9c516f3f714ad4974ecdd27f567d03d05 (diff) | |
| download | rust-69ded69d630e9f908aa0cf65dba124a9eb9d6eb7.tar.gz rust-69ded69d630e9f908aa0cf65dba124a9eb9d6eb7.zip | |
std: Remove deprecated AsOsStr/Str/AsSlice traits
Cleaning out more deprecated items
Diffstat (limited to 'src/libcollections')
| -rw-r--r-- | src/libcollections/slice.rs | 2 | ||||
| -rw-r--r-- | src/libcollections/str.rs | 2 | ||||
| -rw-r--r-- | src/libcollections/string.rs | 9 | ||||
| -rw-r--r-- | src/libcollections/vec.rs | 12 |
4 files changed, 2 insertions, 23 deletions
diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs index 5be9739cb32..6622d8a9c40 100644 --- a/src/libcollections/slice.rs +++ b/src/libcollections/slice.rs @@ -98,7 +98,7 @@ use self::Direction::*; use borrow::{Borrow, BorrowMut, ToOwned}; use vec::Vec; -pub use core::slice::{Chunks, AsSlice, Windows}; +pub use core::slice::{Chunks, Windows}; pub use core::slice::{Iter, IterMut}; pub use core::slice::{IntSliceExt, SplitMut, ChunksMut, Split}; pub use core::slice::{SplitN, RSplitN, SplitNMut, RSplitNMut}; diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 266cda9a237..c62bde482b7 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -67,7 +67,7 @@ use rustc_unicode; use vec::Vec; use slice::SliceConcatExt; -pub use core::str::{FromStr, Utf8Error, Str}; +pub use core::str::{FromStr, Utf8Error}; pub use core::str::{Lines, LinesAny, CharRange}; pub use core::str::{Split, RSplit}; pub use core::str::{SplitN, RSplitN}; diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index 85f8a9caaaa..384c049d386 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -837,15 +837,6 @@ impl<'a, 'b> PartialEq<Cow<'a, str>> for &'b str { fn ne(&self, other: &Cow<'a, str>) -> bool { PartialEq::ne(&self[..], &other[..]) } } -#[unstable(feature = "collections", reason = "waiting on Str stabilization")] -#[allow(deprecated)] -impl Str for String { - #[inline] - fn as_slice(&self) -> &str { - unsafe { mem::transmute(&*self.vec) } - } -} - #[stable(feature = "rust1", since = "1.0.0")] impl Default for String { #[inline] diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 4fa91a6a16a..813f88c4728 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -1598,18 +1598,6 @@ impl<T: Ord> Ord for Vec<T> { } #[unstable(feature = "collections", - reason = "will be replaced by slice syntax")] -#[deprecated(since = "1.0.0", reason = "use &mut s[..] instead")] -#[allow(deprecated)] -impl<T> AsSlice<T> for Vec<T> { - /// Deprecated: use `&mut s[..]` instead. - #[inline] - fn as_slice(&self) -> &[T] { - self - } -} - -#[unstable(feature = "collections", reason = "recent addition, needs more experience")] impl<'a, T: Clone> Add<&'a [T]> for Vec<T> { type Output = Vec<T>; |
