Skip to content

Commit

Permalink
Not insta-stable
Browse files Browse the repository at this point in the history
  • Loading branch information
zachs18 committed Mar 21, 2024
1 parent 4250216 commit 1b95760
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions library/core/src/ptr/non_null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1580,16 +1580,14 @@ impl<T> NonNull<[T]> {
/// # Examples
///
/// ```rust
/// #![feature(slice_ptr_is_empty_nonnull)]
/// use std::ptr::NonNull;
///
/// let slice: NonNull<[i8]> = NonNull::slice_from_raw_parts(NonNull::dangling(), 3);
/// assert!(!slice.is_empty());
/// ```
#[stable(feature = "slice_ptr_is_empty_nonnull", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(
feature = "const_slice_ptr_is_empty_nonnull",
since = "CURRENT_RUSTC_VERSION"
)]
#[unstable(feature = "slice_ptr_is_empty_nonnull", issue = "71146")]
#[rustc_const_unstable(feature = "const_slice_ptr_is_empty_nonnull", issue = "71146")]
#[must_use]
#[inline]
pub const fn is_empty(self) -> bool {
Expand Down

0 comments on commit 1b95760

Please sign in to comment.