File tree 4 files changed +1
-7
lines changed
4 files changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -702,24 +702,21 @@ impl<T> RefCell<T> {
702
702
/// Replaces the wrapped value with a new one computed from `f`, returning
703
703
/// the old value, without deinitializing either one.
704
704
///
705
- /// This function corresponds to [`std::mem::replace`](../mem/fn.replace.html).
706
- ///
707
705
/// # Panics
708
706
///
709
707
/// Panics if the value is currently borrowed.
710
708
///
711
709
/// # Examples
712
710
///
713
711
/// ```
714
- /// #![feature(refcell_replace_swap)]
715
712
/// use std::cell::RefCell;
716
713
/// let cell = RefCell::new(5);
717
714
/// let old_value = cell.replace_with(|&mut old| old + 1);
718
715
/// assert_eq!(old_value, 5);
719
716
/// assert_eq!(cell, RefCell::new(6));
720
717
/// ```
721
718
#[ inline]
722
- #[ unstable ( feature = "refcell_replace_swap" , issue= "43570 ") ]
719
+ #[ stable ( feature = "refcell_replace_swap" , since= "1.35.0 ") ]
723
720
pub fn replace_with < F : FnOnce ( & mut T ) -> T > ( & self , f : F ) -> T {
724
721
let mut_borrow = & mut * self . borrow_mut ( ) ;
725
722
let replacement = f ( mut_borrow) ;
Original file line number Diff line number Diff line change 16
16
#![ feature( pattern) ]
17
17
#![ feature( range_is_empty) ]
18
18
#![ feature( raw) ]
19
- #![ feature( refcell_replace_swap) ]
20
19
#![ feature( slice_patterns) ]
21
20
#![ feature( sort_internals) ]
22
21
#![ feature( specialization) ]
Original file line number Diff line number Diff line change 45
45
#![ feature( proc_macro_internals) ]
46
46
#![ feature( optin_builtin_traits) ]
47
47
#![ feature( range_is_empty) ]
48
- #![ feature( refcell_replace_swap) ]
49
48
#![ feature( rustc_diagnostic_macros) ]
50
49
#![ feature( rustc_attrs) ]
51
50
#![ feature( slice_patterns) ]
Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ This API is completely unstable and subject to change.
64
64
#![ feature( crate_visibility_modifier) ]
65
65
#![ feature( exhaustive_patterns) ]
66
66
#![ feature( nll) ]
67
- #![ feature( refcell_replace_swap) ]
68
67
#![ feature( rustc_diagnostic_macros) ]
69
68
#![ feature( slice_patterns) ]
70
69
#![ feature( never_type) ]
You can’t perform that action at this time.
0 commit comments