mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Stabilize refcell_take
This commit is contained in:
parent
52e3cf13aa
commit
5c6689baff
@ -1027,7 +1027,6 @@ impl<T: Default> RefCell<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(refcell_take)]
|
||||
/// use std::cell::RefCell;
|
||||
///
|
||||
/// let c = RefCell::new(5);
|
||||
@ -1036,7 +1035,7 @@ impl<T: Default> RefCell<T> {
|
||||
/// assert_eq!(five, 5);
|
||||
/// assert_eq!(c.into_inner(), 0);
|
||||
/// ```
|
||||
#[unstable(feature = "refcell_take", issue = "71395")]
|
||||
#[stable(feature = "refcell_take", since = "1.50.0")]
|
||||
pub fn take(&self) -> T {
|
||||
self.replace(Default::default())
|
||||
}
|
||||
|
@ -297,7 +297,6 @@
|
||||
#![feature(raw)]
|
||||
#![feature(raw_ref_macros)]
|
||||
#![feature(ready_macro)]
|
||||
#![feature(refcell_take)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(rustc_private)]
|
||||
#![feature(shrink_to)]
|
||||
|
Loading…
Reference in New Issue
Block a user