Add diagnostic items for <*const _>::cast
and ptr::from_mut
This commit is contained in:
parent
ef3413d423
commit
0b9529cca3
3 changed files with 4 additions and 0 deletions
|
@ -54,6 +54,7 @@ impl<T: ?Sized> *mut 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 = "ptr_cast"]
|
||||
#[inline(always)]
|
||||
pub const fn cast<U>(self) -> *mut U {
|
||||
self as _
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue