Skip to content

Commit 363b660

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

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

library/core/src/ptr/mod.rs

+5-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,9 @@ 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")]
727+
#[rustc_allow_const_fn_unstable(const_mut_refs)]
725728
#[rustc_never_returns_null_ptr]
726729
pub const fn from_mut<T: ?Sized>(r: &mut T) -> *mut T {
727730
r

0 commit comments

Comments
 (0)