From 8fb05491514c5cfb3c3aa03e0266389fa0b29ed0 Mon Sep 17 00:00:00 2001 From: Fabian Drinck Date: Sun, 17 Mar 2019 17:40:25 +0100 Subject: Fix doc tests --- src/libcore/cell.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'src/libcore') diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 753f10e6a0a..3b888244341 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -1421,7 +1421,6 @@ impl fmt::Display for RefMut<'_, T> { /// /// ``` /// use std::cell::UnsafeCell; -/// use std::marker::Sync; /// /// # #[allow(dead_code)] /// struct NotThreadSafe { -- cgit 1.4.1-3-g733a5 From 70fa616a23b59e4b7b537e55f5b95ec3e963b2fd Mon Sep 17 00:00:00 2001 From: Jean-Marie Comets Date: Sun, 31 Mar 2019 10:54:00 +0200 Subject: Stabilize refcell_replace_swap feature, closes #43570 --- src/libcore/cell.rs | 3 +-- src/libcore/tests/lib.rs | 1 - src/librustc/lib.rs | 1 - src/librustc_typeck/lib.rs | 1 - src/libsyntax/feature_gate.rs | 2 ++ 5 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/libcore') diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 753f10e6a0a..99169a6a259 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -711,7 +711,6 @@ impl RefCell { /// # 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 +718,7 @@ impl RefCell { /// 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 T>(&self, f: F) -> T { let mut_borrow = &mut *self.borrow_mut(); let replacement = f(mut_borrow); 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)] diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index e905c368851..b87343b43c9 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -45,7 +45,6 @@ #![feature(proc_macro_internals)] #![feature(optin_builtin_traits)] #![feature(range_is_empty)] -#![feature(refcell_replace_swap)] #![feature(rustc_diagnostic_macros)] #![feature(rustc_attrs)] #![feature(slice_patterns)] diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index cc90044573c..1fa16352b86 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -64,7 +64,6 @@ This API is completely unstable and subject to change. #![feature(crate_visibility_modifier)] #![feature(exhaustive_patterns)] #![feature(nll)] -#![feature(refcell_replace_swap)] #![feature(rustc_diagnostic_macros)] #![feature(slice_patterns)] #![feature(never_type)] diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index dcb55fb572f..d53cfddaf8d 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -703,6 +703,8 @@ declare_features! ( (accepted, extern_crate_self, "1.34.0", Some(56409), None), // support for arbitrary delimited token streams in non-macro attributes (accepted, unrestricted_attribute_tokens, "1.34.0", Some(55208), None), + // add replace and swap functions to RefCell + (accepted, refcell_replace_swap, "1.35.0", Some(43570), None), ); // If you change this, please modify `src/doc/unstable-book` as well. You must -- cgit 1.4.1-3-g733a5 From c789a539a29b411b89411f8660d6ed2c2c4c4bbb Mon Sep 17 00:00:00 2001 From: Jean-Marie Comets Date: Sun, 31 Mar 2019 14:50:06 +0200 Subject: refcell_replace_swap: remove feature gate & obsolete documentation item --- src/libcore/cell.rs | 2 -- src/libsyntax/feature_gate.rs | 2 -- 2 files changed, 4 deletions(-) (limited to 'src/libcore') diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 99169a6a259..f8c7ce10132 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -702,8 +702,6 @@ impl RefCell { /// 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. diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index d53cfddaf8d..dcb55fb572f 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -703,8 +703,6 @@ declare_features! ( (accepted, extern_crate_self, "1.34.0", Some(56409), None), // support for arbitrary delimited token streams in non-macro attributes (accepted, unrestricted_attribute_tokens, "1.34.0", Some(55208), None), - // add replace and swap functions to RefCell - (accepted, refcell_replace_swap, "1.35.0", Some(43570), None), ); // If you change this, please modify `src/doc/unstable-book` as well. You must -- cgit 1.4.1-3-g733a5