Add diagnostic items for ptr::cast_mut and ptr::from_ref

This commit is contained in:
Urgau
2023-05-17 14:54:56 +02:00
parent 617d3d6d72
commit a51ad131e6
3 changed files with 4 additions and 0 deletions

View File

@@ -698,6 +698,7 @@ where
#[inline(always)]
#[must_use]
#[unstable(feature = "ptr_from_ref", issue = "106116")]
#[rustc_diagnostic_item = "ptr_from_ref"]
pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
r
}