diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index 613791448eb5b..1112415e3a875 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -712,14 +712,12 @@ impl Box { /// # Examples /// /// ``` - /// #![feature(smart_pointer_try_map)] - /// /// let b = Box::new(7); /// let new = Box::map(b, |i| i + 7); /// assert_eq!(*new, 14); /// ``` #[cfg(not(no_global_oom_handling))] - #[unstable(feature = "smart_pointer_try_map", issue = "144419")] + #[stable(feature = "smart_pointer_map", since = "CURRENT_RUSTC_VERSION")] pub fn map(this: Self, f: impl FnOnce(T) -> U) -> Box { let (value, allocation) = Box::take(this); let (raw, alloc) = Box::into_non_null_with_allocator(allocation); diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index 37714859ede38..5a76dae6400bd 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -1033,8 +1033,6 @@ impl Rc { /// # Examples /// /// ``` - /// #![feature(smart_pointer_try_map)] - /// /// use std::rc::Rc; /// /// let r = Rc::new(7); @@ -1042,7 +1040,7 @@ impl Rc { /// assert_eq!(*new, 14); /// ``` #[cfg(not(no_global_oom_handling))] - #[unstable(feature = "smart_pointer_try_map", issue = "144419")] + #[stable(feature = "smart_pointer_map", since = "CURRENT_RUSTC_VERSION")] pub fn map(this: Self, f: impl FnOnce(&T) -> U) -> Rc { if size_of::() == size_of::() && align_of::() == align_of::() @@ -4274,7 +4272,6 @@ impl UniqueRc { /// # Examples /// /// ``` - /// #![feature(smart_pointer_try_map)] /// #![feature(unique_rc_arc)] /// /// use std::rc::UniqueRc; @@ -4284,7 +4281,7 @@ impl UniqueRc { /// assert_eq!(*new, 14); /// ``` #[cfg(not(no_global_oom_handling))] - #[unstable(feature = "smart_pointer_try_map", issue = "144419")] + #[unstable(feature = "unique_rc_arc", issue = "112566")] pub fn map(this: Self, f: impl FnOnce(T) -> U) -> UniqueRc { if size_of::() == size_of::() && align_of::() == align_of::() diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index cca6f881e1740..7dd5393a32295 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -1189,8 +1189,6 @@ impl Arc { /// # Examples /// /// ``` - /// #![feature(smart_pointer_try_map)] - /// /// use std::sync::Arc; /// /// let r = Arc::new(7); @@ -1198,7 +1196,7 @@ impl Arc { /// assert_eq!(*new, 14); /// ``` #[cfg(not(no_global_oom_handling))] - #[unstable(feature = "smart_pointer_try_map", issue = "144419")] + #[stable(feature = "smart_pointer_map", since = "CURRENT_RUSTC_VERSION")] pub fn map(this: Self, f: impl FnOnce(&T) -> U) -> Arc { if size_of::() == size_of::() && align_of::() == align_of::() @@ -4739,7 +4737,6 @@ impl UniqueArc { /// # Examples /// /// ``` - /// #![feature(smart_pointer_try_map)] /// #![feature(unique_rc_arc)] /// /// use std::sync::UniqueArc; @@ -4749,7 +4746,7 @@ impl UniqueArc { /// assert_eq!(*new, 14); /// ``` #[cfg(not(no_global_oom_handling))] - #[unstable(feature = "smart_pointer_try_map", issue = "144419")] + #[unstable(feature = "unique_rc_arc", issue = "112566")] pub fn map(this: Self, f: impl FnOnce(T) -> U) -> UniqueArc { if size_of::() == size_of::() && align_of::() == align_of::()