Skip to content

Commit 7391bf8

Browse files
committed
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.
1 parent 25687ca commit 7391bf8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/liballoc/rc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1706,7 +1706,7 @@ impl<T> Weak<T> {
17061706
/// ```
17071707
///
17081708
/// [`null`]: ../../std/ptr/fn.null.html
1709-
#[stable(feature = "weak_into_raw", since = "1.45.0")]
1709+
#[stable(feature = "rc_as_ptr", since = "1.45.0")]
17101710
pub fn as_ptr(&self) -> *const T {
17111711
let offset = data_offset_sized::<T>();
17121712
let ptr = self.ptr.cast::<u8>().as_ptr().wrapping_offset(offset);

src/liballoc/sync.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ impl<T: ?Sized> Arc<T> {
587587
/// assert_eq!(x_ptr, Arc::as_ptr(&y));
588588
/// assert_eq!(unsafe { &*x_ptr }, "hello");
589589
/// ```
590-
#[stable(feature = "weak_into_raw", since = "1.45.0")]
590+
#[stable(feature = "rc_as_ptr", since = "1.45.0")]
591591
pub fn as_ptr(this: &Self) -> *const T {
592592
let ptr: *mut ArcInner<T> = NonNull::as_ptr(this.ptr);
593593
let fake_ptr = ptr as *mut T;

0 commit comments

Comments
 (0)