Skip to content

Commit

Permalink
Stabilize feature cstr_is_empty
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillikin committed May 1, 2023
1 parent 9ecda8d commit 5a04193
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions library/core/src/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,6 @@ impl CStr {
/// # Examples
///
/// ```
/// #![feature(cstr_is_empty)]
///
/// use std::ffi::CStr;
/// # use std::ffi::FromBytesWithNulError;
///
Expand All @@ -533,7 +531,8 @@ impl CStr {
/// # }
/// ```
#[inline]
#[unstable(feature = "cstr_is_empty", issue = "102444")]
#[stable(feature = "cstr_is_empty", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "cstr_is_empty", since = "CURRENT_RUSTC_VERSION")]
pub const fn is_empty(&self) -> bool {
// SAFETY: We know there is at least one byte; for empty strings it
// is the NUL terminator.
Expand Down

0 comments on commit 5a04193

Please sign in to comment.