Move replace_with to its own feature flag

I'm not allowed to have the same feature flag associated with multiple stability levels.
This commit is contained in:
Michael Howell 2017-12-05 12:03:57 -07:00 committed by GitHub
parent fd064e041a
commit 28a19bfa7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -616,7 +616,7 @@ impl<T> RefCell<T> {
/// assert_eq!(cell, RefCell::new(6));
/// ```
#[inline]
#[unstable(feature = "refcell_replace_swap", issue="43570")]
#[unstable(feature = "refcell_replace_with", issue="43570")]
pub fn replace_with<F: FnOnce(&mut T) -> T>(&self, f: F) -> T {
let mut_borrow = &mut *self.borrow_mut();
let replacement = f(mut_borrow);