about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-03-31 17:21:14 +0000
committerbors <bors@rust-lang.org>2019-03-31 17:21:14 +0000
commit4fac5c98b22faa7fce2d5d64bf34c61340883302 (patch)
tree9c75e0759b74f210c61fcc192fdd1b05d9784df9 /src/libcore
parenta89c03a30a1e8f1cd190114b765d01752d3ce8d8 (diff)
parent34454451a19210341263ea32962d96f41faec2a5 (diff)
downloadrust-4fac5c98b22faa7fce2d5d64bf34c61340883302.tar.gz
rust-4fac5c98b22faa7fce2d5d64bf34c61340883302.zip
Auto merge of #59590 - Centril:rollup, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #58805 (Lint for redundant imports)
 - #59506 (Use platform dependent mcount function)
 - #59519 (rustc_target: factor out common fields of non-Single Variants.)
 - #59580 (Allow closure to unsafe fn coercion)
 - #59581 (Stabilize refcell_replace_swap feature)
 - #59583 (match match match match match)
 - #59587 (Remove #[doc(hidden)] from Error::type_id)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/cell.rs6
-rw-r--r--src/libcore/tests/lib.rs1
2 files changed, 1 insertions, 6 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs
index 753f10e6a0a..80dd51acc9e 100644
--- a/src/libcore/cell.rs
+++ b/src/libcore/cell.rs
@@ -702,8 +702,6 @@ impl<T> RefCell<T> {
     /// Replaces the wrapped value with a new one computed from `f`, returning
     /// the old value, without deinitializing either one.
     ///
-    /// This function corresponds to [`std::mem::replace`](../mem/fn.replace.html).
-    ///
     /// # Panics
     ///
     /// Panics if the value is currently borrowed.
@@ -711,7 +709,6 @@ impl<T> RefCell<T> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(refcell_replace_swap)]
     /// use std::cell::RefCell;
     /// let cell = RefCell::new(5);
     /// let old_value = cell.replace_with(|&mut old| old + 1);
@@ -719,7 +716,7 @@ impl<T> RefCell<T> {
     /// assert_eq!(cell, RefCell::new(6));
     /// ```
     #[inline]
-    #[unstable(feature = "refcell_replace_swap", issue="43570")]
+    #[stable(feature = "refcell_replace_swap", since="1.35.0")]
     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);
@@ -1421,7 +1418,6 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
 ///
 /// ```
 /// use std::cell::UnsafeCell;
-/// use std::marker::Sync;
 ///
 /// # #[allow(dead_code)]
 /// struct NotThreadSafe<T> {
diff --git a/src/libcore/tests/lib.rs b/src/libcore/tests/lib.rs
index 2ed25a34102..5e0dbb7ab2f 100644
--- a/src/libcore/tests/lib.rs
+++ b/src/libcore/tests/lib.rs
@@ -16,7 +16,6 @@
 #![feature(pattern)]
 #![feature(range_is_empty)]
 #![feature(raw)]
-#![feature(refcell_replace_swap)]
 #![feature(slice_patterns)]
 #![feature(sort_internals)]
 #![feature(specialization)]