Skip to content

Commit 83b05ef

Browse files
committed
Stabilize feature 'cstr_from_bytes_until_nul'
1 parent ad8e1dc commit 83b05ef

File tree

5 files changed

+5
-10
lines changed

5 files changed

+5
-10
lines changed

library/alloc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@
116116
#![feature(const_eval_select)]
117117
#![feature(const_pin)]
118118
#![feature(const_waker)]
119-
#![feature(cstr_from_bytes_until_nul)]
120119
#![feature(dispatch_from_dyn)]
121120
#![feature(error_generic_member_access)]
122121
#![feature(error_in_core)]

library/core/src/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ impl Error for crate::ffi::FromBytesWithNulError {
505505
}
506506
}
507507

508-
#[unstable(feature = "cstr_from_bytes_until_nul", issue = "95027")]
508+
#[stable(feature = "cstr_from_bytes_until_nul", since = "CURRENT_RUSTC_VERSION")]
509509
impl Error for crate::ffi::FromBytesUntilNulError {}
510510

511511
#[unstable(feature = "get_many_mut", issue = "104642")]

library/core/src/ffi/c_str.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ impl FromBytesWithNulError {
150150
/// This error is created by the [`CStr::from_bytes_until_nul`] method.
151151
///
152152
#[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")]
154154
pub struct FromBytesUntilNulError(());
155155

156-
#[unstable(feature = "cstr_from_bytes_until_nul", issue = "95027")]
156+
#[stable(feature = "cstr_from_bytes_until_nul", since = "CURRENT_RUSTC_VERSION")]
157157
impl fmt::Display for FromBytesUntilNulError {
158158
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
159159
write!(f, "data provided does not contain a nul")
@@ -306,8 +306,6 @@ impl CStr {
306306
///
307307
/// # Examples
308308
/// ```
309-
/// #![feature(cstr_from_bytes_until_nul)]
310-
///
311309
/// use std::ffi::CStr;
312310
///
313311
/// let mut buffer = [0u8; 16];
@@ -322,8 +320,8 @@ impl CStr {
322320
/// assert_eq!(c_str.to_str().unwrap(), "AAAAAAAA");
323321
/// ```
324322
///
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")]
327325
pub const fn from_bytes_until_nul(bytes: &[u8]) -> Result<&CStr, FromBytesUntilNulError> {
328326
let nul_pos = memchr::memchr(0, bytes);
329327
match nul_pos {

library/std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@
278278
#![feature(char_error_internals)]
279279
#![feature(char_internals)]
280280
#![feature(core_intrinsics)]
281-
#![feature(cstr_from_bytes_until_nul)]
282281
#![feature(cstr_internals)]
283282
#![feature(duration_constants)]
284283
#![feature(error_generic_member_access)]

src/tools/miri/tests/pass-dep/shims/pthreads.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ignore-target-windows: No libc on Windows
2-
#![feature(cstr_from_bytes_until_nul)]
32
use std::ffi::{CStr, CString};
43
use std::thread;
54

0 commit comments

Comments
 (0)