1
Fork 0

Add diagnostic items for <*const _>::cast and <*mut _>::cast_const

This commit is contained in:
Urgau 2023-08-14 11:47:42 +02:00
parent 570601f0aa
commit 6933848fbf
3 changed files with 4 additions and 0 deletions

View file

@ -55,6 +55,7 @@ impl<T: ?Sized> *const T {
/// Casts to a pointer of another type.
#[stable(feature = "ptr_cast", since = "1.38.0")]
#[rustc_const_stable(feature = "const_ptr_cast", since = "1.38.0")]
#[rustc_diagnostic_item = "const_ptr_cast"]
#[inline(always)]
pub const fn cast<U>(self) -> *const U {
self as _