Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions library/core/src/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ where
#[inline(always)]
#[must_use]
#[unstable(feature = "ptr_from_ref", issue = "106116")]
pub fn from_ref<T: ?Sized>(r: &T) -> *const T {
pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
r
}

Expand All @@ -702,7 +702,7 @@ pub fn from_ref<T: ?Sized>(r: &T) -> *const T {
#[inline(always)]
#[must_use]
#[unstable(feature = "ptr_from_ref", issue = "106116")]
pub fn from_mut<T: ?Sized>(r: &mut T) -> *mut T {
pub const fn from_mut<T: ?Sized>(r: &mut T) -> *mut T {
r
}

Expand Down