diff options
| author | bors <bors@rust-lang.org> | 2016-12-18 17:37:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-12-18 17:37:25 +0000 |
| commit | 1f965cc8e9dc8f8b26eac99cffdef6501cf0c617 (patch) | |
| tree | e0df29c8bc2f181da612f1685364c0eee24a15e1 /src/libstd/io | |
| parent | 8327b5afafde7cdd6fd4e939d9a8fe12f76503ef (diff) | |
| parent | 9a5cef4de51c1c90fb2d05b0c7e6feb9cf0224d6 (diff) | |
| download | rust-1f965cc8e9dc8f8b26eac99cffdef6501cf0c617.tar.gz rust-1f965cc8e9dc8f8b26eac99cffdef6501cf0c617.zip | |
Auto merge of #38369 - aturon:stab-1.15, r=alexcrichton
Library stabilizations/deprecations for 1.15 release
Stabilized:
- `std::iter::Iterator::{min_by, max_by}`
- `std::os::*::fs::FileExt`
- `std::sync::atomic::Atomic*::{get_mut, into_inner}`
- `std::vec::IntoIter::{as_slice, as_mut_slice}`
- `std::sync::mpsc::Receiver::try_iter`
- `std::os::unix::process::CommandExt::before_exec`
- `std::rc::Rc::{strong_count, weak_count}`
- `std::sync::Arc::{strong_count, weak_count}`
- `std::char::{encode_utf8, encode_utf16}`
- `std::cell::Ref::clone`
- `std::io::Take::into_inner`
Deprecated:
- `std::rc::Rc::{would_unwrap, is_unique}`
- `std::cell::RefCell::borrow_state`
Closes #23755
Closes #27733
Closes #27746
Closes #27784
Closes #28356
Closes #31398
Closes #34931
Closes #35601
Closes #35603
Closes #35918
Closes #36105
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/mod.rs | 4 | ||||
| -rw-r--r-- | src/libstd/io/stdio.rs | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index b3b89213df1..b07da0dc268 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -1526,8 +1526,6 @@ impl<T> Take<T> { /// # Examples /// /// ``` - /// #![feature(io_take_into_inner)] - /// /// use std::io; /// use std::io::prelude::*; /// use std::fs::File; @@ -1543,7 +1541,7 @@ impl<T> Take<T> { /// # Ok(()) /// # } /// ``` - #[unstable(feature = "io_take_into_inner", issue = "23755")] + #[stable(feature = "io_take_into_inner", since = "1.15.0")] pub fn into_inner(self) -> T { self.inner } diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 6419a9ff683..1a65bee13b8 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -10,7 +10,7 @@ use io::prelude::*; -use cell::{RefCell, BorrowState}; +use cell::RefCell; use fmt; use io::lazy::Lazy; use io::{self, BufReader, LineWriter}; @@ -638,8 +638,8 @@ pub fn _print(args: fmt::Arguments) { LocalKeyState::Destroyed => stdout().write_fmt(args), LocalKeyState::Valid => { LOCAL_STDOUT.with(|s| { - if s.borrow_state() == BorrowState::Unused { - if let Some(w) = s.borrow_mut().as_mut() { + if let Ok(mut borrowed) = s.try_borrow_mut() { + if let Some(w) = borrowed.as_mut() { return w.write_fmt(args); } } |
