diff options
| author | bors <bors@rust-lang.org> | 2015-07-31 02:57:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-07-31 02:57:34 +0000 |
| commit | cb250b722e8c9c8b2e6dff249ce8e027dce2cd65 (patch) | |
| tree | d461b5e0dc9af3ffe4f051f31cd5b1450977130e /src/libstd/io | |
| parent | dc966ef95cf9c428b29e1346e54768f7411466c8 (diff) | |
| parent | 76db37ee4b916a678181b36e42c26d92524e7041 (diff) | |
| download | rust-cb250b722e8c9c8b2e6dff249ce8e027dce2cd65.tar.gz rust-cb250b722e8c9c8b2e6dff249ce8e027dce2cd65.zip | |
Auto merge of #27370 - alexcrichton:stabilize-easy, r=brson
The following APIs were all marked with a `#[stable]` tag:
* process::Child::id
* error::Error::is
* error::Error::downcast
* error::Error::downcast_ref
* error::Error::downcast_mut
* io::Error::get_ref
* io::Error::get_mut
* io::Error::into_inner
* hash::Hash::hash_slice
* hash::Hasher::write_{i,u}{8,16,32,64,size}
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/error.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs index 3b48ff30960..e12e202148b 100644 --- a/src/libstd/io/error.rs +++ b/src/libstd/io/error.rs @@ -219,8 +219,7 @@ impl Error { /// /// If this `Error` was constructed via `new` then this function will /// return `Some`, otherwise it will return `None`. - #[unstable(feature = "io_error_inner", - reason = "recently added and requires UFCS to downcast")] + #[stable(feature = "io_error_inner", since = "1.3.0")] pub fn get_ref(&self) -> Option<&(error::Error+Send+Sync+'static)> { match self.repr { Repr::Os(..) => None, @@ -233,8 +232,7 @@ impl Error { /// /// If this `Error` was constructed via `new` then this function will /// return `Some`, otherwise it will return `None`. - #[unstable(feature = "io_error_inner", - reason = "recently added and requires UFCS to downcast")] + #[stable(feature = "io_error_inner", since = "1.3.0")] pub fn get_mut(&mut self) -> Option<&mut (error::Error+Send+Sync+'static)> { match self.repr { Repr::Os(..) => None, @@ -246,8 +244,7 @@ impl Error { /// /// If this `Error` was constructed via `new` then this function will /// return `Some`, otherwise it will return `None`. - #[unstable(feature = "io_error_inner", - reason = "recently added and requires UFCS to downcast")] + #[stable(feature = "io_error_inner", since = "1.3.0")] pub fn into_inner(self) -> Option<Box<error::Error+Send+Sync>> { match self.repr { Repr::Os(..) => None, @@ -349,10 +346,10 @@ mod test { // we have to call all of these UFCS style right now since method // resolution won't implicitly drop the Send+Sync bounds let mut err = Error::new(ErrorKind::Other, TestError); - assert!(error::Error::is::<TestError>(err.get_ref().unwrap())); + assert!(err.get_ref().unwrap().is::<TestError>()); assert_eq!("asdf", err.get_ref().unwrap().description()); - assert!(error::Error::is::<TestError>(err.get_mut().unwrap())); + assert!(err.get_mut().unwrap().is::<TestError>()); let extracted = err.into_inner().unwrap(); - error::Error::downcast::<TestError>(extracted).unwrap(); + extracted.downcast::<TestError>().unwrap(); } } |
