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.
ptr::cast_mut
ptr::from_ref
1 parent 0fad623 commit 601399cCopy full SHA for 601399c
core/src/ptr/const_ptr.rs
@@ -104,6 +104,7 @@ impl<T: ?Sized> *const T {
104
/// refactored.
105
#[stable(feature = "ptr_const_cast", since = "1.65.0")]
106
#[rustc_const_stable(feature = "ptr_const_cast", since = "1.65.0")]
107
+ #[rustc_diagnostic_item = "ptr_cast_mut"]
108
#[inline(always)]
109
pub const fn cast_mut(self) -> *mut T {
110
self as _
core/src/ptr/mod.rs
@@ -698,6 +698,7 @@ where
698
699
#[must_use]
700
#[unstable(feature = "ptr_from_ref", issue = "106116")]
701
+#[rustc_diagnostic_item = "ptr_from_ref"]
702
pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
703
r
704
}
0 commit comments