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

This commit is contained in:
Urgau 2023-05-17 16:49:18 +02:00
parent f798ada7ba
commit 1e377c16fe
3 changed files with 4 additions and 0 deletions

View File

@ -1151,8 +1151,10 @@
profiler_runtime,
ptr,
ptr_cast_mut,
ptr_const_is_null,
ptr_from_ref,
ptr_guaranteed_cmp,
ptr_is_null,
ptr_mask,
ptr_null,
ptr_null_mut,

View File

@ -30,6 +30,7 @@ impl<T: ?Sized> *const T {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ptr_is_null", issue = "74939")]
#[rustc_diagnostic_item = "ptr_const_is_null"]
#[inline]
pub const fn is_null(self) -> bool {
#[inline]

View File

@ -29,6 +29,7 @@ impl<T: ?Sized> *mut T {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ptr_is_null", issue = "74939")]
#[rustc_diagnostic_item = "ptr_is_null"]
#[inline]
pub const fn is_null(self) -> bool {
#[inline]