about summary refs log tree commit diff
path: root/src/libcore/option.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-30 11:00:05 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-31 15:49:57 -0700
commitd4a2c941809f303b97d153e06ba07e95cd245f88 (patch)
treef876f056ff60aeac3f0098deb2dbe1fabfd13091 /src/libcore/option.rs
parentd754722a04b99fdcae0fd97fa2a4395521145ef2 (diff)
downloadrust-d4a2c941809f303b97d153e06ba07e95cd245f88.tar.gz
rust-d4a2c941809f303b97d153e06ba07e95cd245f88.zip
std: Clean out #[deprecated] APIs
This commit cleans out a large amount of deprecated APIs from the standard
library and some of the facade crates as well, updating all users in the
compiler and in tests as it goes along.
Diffstat (limited to 'src/libcore/option.rs')
-rw-r--r--src/libcore/option.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index c5102ede29f..6db7c9bd99d 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -154,8 +154,6 @@ use mem;
 use ops::FnOnce;
 use result::Result::{Ok, Err};
 use result::Result;
-#[allow(deprecated)]
-use slice::AsSlice;
 use slice;
 
 // Note that this is not a lang item per se, but it has a hidden dependency on
@@ -765,25 +763,6 @@ impl<T: Default> Option<T> {
 // Trait implementations
 /////////////////////////////////////////////////////////////////////////////
 
-#[unstable(feature = "core",
-           reason = "waiting on the stability of the trait itself")]
-#[deprecated(since = "1.0.0",
-             reason = "use the inherent method instead")]
-#[allow(deprecated)]
-impl<T> AsSlice<T> for Option<T> {
-    /// Convert from `Option<T>` to `&[T]` (without copying)
-    #[inline]
-    fn as_slice<'a>(&'a self) -> &'a [T] {
-        match *self {
-            Some(ref x) => slice::ref_slice(x),
-            None => {
-                let result: &[_] = &[];
-                result
-            }
-        }
-    }
-}
-
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Default for Option<T> {
     #[inline]