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
This commit is contained in:
commit
7d7b3e637c
@ -1701,7 +1701,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 ptr: *mut RcBox<T> = NonNull::as_ptr(self.ptr);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user