diff options
Diffstat (limited to 'src/libcore/slice.rs')
| -rw-r--r-- | src/libcore/slice.rs | 31 | 
1 files changed, 0 insertions, 31 deletions
| diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 4b1742a4348..102a46a6bc8 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -595,37 +595,6 @@ impl<T> ops::IndexMut<RangeFull> for [T] { // Common traits //////////////////////////////////////////////////////////////////////////////// -/// Data that is viewable as a slice. -#[unstable(feature = "core", - reason = "will be replaced by slice syntax")] -#[deprecated(since = "1.0.0", - reason = "use std::convert::AsRef<[T]> instead")] -pub trait AsSlice<T> { - /// Work with `self` as a slice. - fn as_slice<'a>(&'a self) -> &'a [T]; -} - -#[unstable(feature = "core", reason = "trait is experimental")] -#[allow(deprecated)] -impl<T> AsSlice<T> for [T] { - #[inline(always)] - fn as_slice<'a>(&'a self) -> &'a [T] { self } -} - -#[unstable(feature = "core", reason = "trait is experimental")] -#[allow(deprecated)] -impl<'a, T, U: ?Sized + AsSlice<T>> AsSlice<T> for &'a U { - #[inline(always)] - fn as_slice(&self) -> &[T] { AsSlice::as_slice(*self) } -} - -#[unstable(feature = "core", reason = "trait is experimental")] -#[allow(deprecated)] -impl<'a, T, U: ?Sized + AsSlice<T>> AsSlice<T> for &'a mut U { - #[inline(always)] - fn as_slice(&self) -> &[T] { AsSlice::as_slice(*self) } -} - #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> Default for &'a [T] { #[stable(feature = "rust1", since = "1.0.0")] | 
