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.
<*const _>::cast
ptr::from_mut
1 parent bec7726 commit 6e92e8cCopy full SHA for 6e92e8c
core/src/ptr/mod.rs
@@ -710,6 +710,7 @@ pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
710
#[inline(always)]
711
#[must_use]
712
#[unstable(feature = "ptr_from_ref", issue = "106116")]
713
+#[rustc_diagnostic_item = "ptr_from_mut"]
714
pub const fn from_mut<T: ?Sized>(r: &mut T) -> *mut T {
715
r
716
}
core/src/ptr/mut_ptr.rs
@@ -54,6 +54,7 @@ impl<T: ?Sized> *mut T {
54
/// Casts to a pointer of another type.
55
#[stable(feature = "ptr_cast", since = "1.38.0")]
56
#[rustc_const_stable(feature = "const_ptr_cast", since = "1.38.0")]
57
+ #[rustc_diagnostic_item = "ptr_cast"]
58
59
pub const fn cast<U>(self) -> *mut U {
60
self as _
0 commit comments