Add diagnostic items for <*const _>::cast
and <*mut _>::cast_const
This commit is contained in:
parent
570601f0aa
commit
6933848fbf
3 changed files with 4 additions and 0 deletions
|
@ -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 _
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue