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, profiler_runtime,
ptr, ptr,
ptr_cast_mut, ptr_cast_mut,
ptr_const_is_null,
ptr_from_ref, ptr_from_ref,
ptr_guaranteed_cmp, ptr_guaranteed_cmp,
ptr_is_null,
ptr_mask, ptr_mask,
ptr_null, ptr_null,
ptr_null_mut, ptr_null_mut,

View File

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

View File

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