about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCAD97 <cad97@cad97.com>2020-07-02 16:55:54 -0400
committerCAD97 <cad97@cad97.com>2020-07-02 16:58:49 -0400
commit7391bf882a040814f25f65f6b6539e2f521d17ec (patch)
tree9d464c8b4c642d0b21afaa36324ab811f70f331c
parent25687caa2e4e35b31c29e28998710670e9d54ee9 (diff)
downloadrust-7391bf882a040814f25f65f6b6539e2f521d17ec.tar.gz
rust-7391bf882a040814f25f65f6b6539e2f521d17ec.zip
Move A|Rc::as_ptr from feature(weak_into_raw)
to feature(rc_as_ptr)

These were stabilized alongside the Weak versions,
but having `feature = "weak_.."` on a fn definition
for the non-weak pointers is potentially very confusing.
-rw-r--r--src/liballoc/rc.rs2
-rw-r--r--src/liballoc/sync.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 4d50ae9efca..f864852ec63 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -1706,7 +1706,7 @@ impl<T> Weak<T> {
     /// ```
     ///
     /// [`null`]: ../../std/ptr/fn.null.html
-    #[stable(feature = "weak_into_raw", since = "1.45.0")]
+    #[stable(feature = "rc_as_ptr", since = "1.45.0")]
     pub fn as_ptr(&self) -> *const T {
         let offset = data_offset_sized::<T>();
         let ptr = self.ptr.cast::<u8>().as_ptr().wrapping_offset(offset);
diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs
index 826f0c8fa83..0bead76a501 100644
--- a/src/liballoc/sync.rs
+++ b/src/liballoc/sync.rs
@@ -587,7 +587,7 @@ impl<T: ?Sized> Arc<T> {
     /// assert_eq!(x_ptr, Arc::as_ptr(&y));
     /// assert_eq!(unsafe { &*x_ptr }, "hello");
     /// ```
-    #[stable(feature = "weak_into_raw", since = "1.45.0")]
+    #[stable(feature = "rc_as_ptr", since = "1.45.0")]
     pub fn as_ptr(this: &Self) -> *const T {
         let ptr: *mut ArcInner<T> = NonNull::as_ptr(this.ptr);
         let fake_ptr = ptr as *mut T;