Skip to content

Commit 1dc3ea8

Browse files
committed
Stabilize ptr::{from_ref, from_mut}
1 parent 1db4b12 commit 1dc3ea8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/core/src/ptr/mod.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,8 @@ where
708708
/// type or mutability, in particular if the code is refactored.
709709
#[inline(always)]
710710
#[must_use]
711-
#[unstable(feature = "ptr_from_ref", issue = "106116")]
711+
#[stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
712+
#[rustc_const_stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
712713
#[rustc_never_returns_null_ptr]
713714
#[rustc_diagnostic_item = "ptr_from_ref"]
714715
pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
@@ -721,7 +722,8 @@ pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
721722
/// type or mutability, in particular if the code is refactored.
722723
#[inline(always)]
723724
#[must_use]
724-
#[unstable(feature = "ptr_from_ref", issue = "106116")]
725+
#[stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
726+
#[rustc_const_stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
725727
#[rustc_never_returns_null_ptr]
726728
pub const fn from_mut<T: ?Sized>(r: &mut T) -> *mut T {
727729
r

0 commit comments

Comments
 (0)