summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Millikin <john@john-millikin.com>2023-05-01 10:51:41 +0900
committerJohn Millikin <john@john-millikin.com>2023-05-01 11:00:16 +0900
commit5a0419352ce3b1eec3ea080dcb81d65409763054 (patch)
tree7ea8b0eb22c3a5de348edd3dcdaa78ccbacdc8b6
parent9ecda8de85ce893cc3fc748ab06be0b8250147a7 (diff)
downloadrust-5a0419352ce3b1eec3ea080dcb81d65409763054.tar.gz
Stabilize feature `cstr_is_empty`
-rw-r--r--library/core/src/ffi/c_str.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/library/core/src/ffi/c_str.rs b/library/core/src/ffi/c_str.rs
index bd2b2c36c43..26b88d1e695 100644
--- a/library/core/src/ffi/c_str.rs
+++ b/library/core/src/ffi/c_str.rs
@@ -517,8 +517,6 @@ impl CStr {
/// # Examples
///
/// ```
- /// #![feature(cstr_is_empty)]
- ///
/// use std::ffi::CStr;
/// # use std::ffi::FromBytesWithNulError;
///
@@ -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.