@@ -150,10 +150,10 @@ impl FromBytesWithNulError {
150
150
/// This error is created by the [`CStr::from_bytes_until_nul`] method.
151
151
///
152
152
#[ derive( Clone , PartialEq , Eq , Debug ) ]
153
- #[ unstable ( feature = "cstr_from_bytes_until_nul" , issue = "95027 " ) ]
153
+ #[ stable ( feature = "cstr_from_bytes_until_nul" , since = "CURRENT_RUSTC_VERSION " ) ]
154
154
pub struct FromBytesUntilNulError ( ( ) ) ;
155
155
156
- #[ unstable ( feature = "cstr_from_bytes_until_nul" , issue = "95027 " ) ]
156
+ #[ stable ( feature = "cstr_from_bytes_until_nul" , since = "CURRENT_RUSTC_VERSION " ) ]
157
157
impl fmt:: Display for FromBytesUntilNulError {
158
158
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
159
159
write ! ( f, "data provided does not contain a nul" )
@@ -306,8 +306,6 @@ impl CStr {
306
306
///
307
307
/// # Examples
308
308
/// ```
309
- /// #![feature(cstr_from_bytes_until_nul)]
310
- ///
311
309
/// use std::ffi::CStr;
312
310
///
313
311
/// let mut buffer = [0u8; 16];
@@ -322,8 +320,8 @@ impl CStr {
322
320
/// assert_eq!(c_str.to_str().unwrap(), "AAAAAAAA");
323
321
/// ```
324
322
///
325
- #[ unstable ( feature = "cstr_from_bytes_until_nul" , issue = "95027 " ) ]
326
- #[ rustc_const_unstable( feature = "cstr_from_bytes_until_nul " , issue = "95027" ) ]
323
+ #[ stable ( feature = "cstr_from_bytes_until_nul" , since = "CURRENT_RUSTC_VERSION " ) ]
324
+ #[ rustc_const_unstable( feature = "const_cstr_from_bytes_until_nul " , issue = "95027" ) ]
327
325
pub const fn from_bytes_until_nul ( bytes : & [ u8 ] ) -> Result < & CStr , FromBytesUntilNulError > {
328
326
let nul_pos = memchr:: memchr ( 0 , bytes) ;
329
327
match nul_pos {
0 commit comments