Skip to content

Commit 7d7b3e6

Browse files
authored
Rollup merge of #73974 - CAD97:rc-no-weak, r=dtolnay
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 misleading, especially in a review context where the impl header may not be immediately visible. r? @RalfJung @bors rollup=always
2 parents 62ba1bf + 7391bf8 commit 7d7b3e6

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
@@ -1701,7 +1701,7 @@ impl<T> Weak<T> {
17011701
/// ```
17021702
///
17031703
/// [`null`]: ../../std/ptr/fn.null.html
1704-
#[stable(feature = "weak_into_raw", since = "1.45.0")]
1704+
#[stable(feature = "rc_as_ptr", since = "1.45.0")]
17051705
pub fn as_ptr(&self) -> *const T {
17061706
let ptr: *mut RcBox<T> = NonNull::as_ptr(self.ptr);
17071707

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

0 commit comments

Comments
 (0)