We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e0c8ba1 + e8fbf62 commit 65db3cbCopy full SHA for 65db3cb
library/core/src/ptr/mod.rs
@@ -691,7 +691,7 @@ where
691
#[inline(always)]
692
#[must_use]
693
#[unstable(feature = "ptr_from_ref", issue = "106116")]
694
-pub fn from_ref<T: ?Sized>(r: &T) -> *const T {
+pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
695
r
696
}
697
@@ -702,7 +702,7 @@ pub fn from_ref<T: ?Sized>(r: &T) -> *const T {
702
703
704
705
-pub fn from_mut<T: ?Sized>(r: &mut T) -> *mut T {
+pub const fn from_mut<T: ?Sized>(r: &mut T) -> *mut T {
706
707
708
0 commit comments