Skip to content

Commit ff214b7

Browse files
authored
Rollup merge of #91855 - xfix:const_cstr_unchecked, r=dtolnay
Stabilize const_cstr_unchecked Closes #90343 ``@rustbot`` modify labels: +T-libs-api
2 parents 8487833 + 23e4aeb commit ff214b7

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

compiler/rustc_codegen_llvm/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
77
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
88
#![feature(bool_to_option)]
9-
#![feature(const_cstr_unchecked)]
109
#![feature(crate_visibility_modifier)]
1110
#![feature(extern_types)]
1211
#![feature(in_band_lifetimes)]

library/std/src/ffi/c_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,7 @@ impl CStr {
12591259
#[inline]
12601260
#[must_use]
12611261
#[stable(feature = "cstr_from_bytes", since = "1.10.0")]
1262-
#[rustc_const_unstable(feature = "const_cstr_unchecked", issue = "90343")]
1262+
#[rustc_const_stable(feature = "const_cstr_unchecked", since = "1.59.0")]
12631263
pub const unsafe fn from_bytes_with_nul_unchecked(bytes: &[u8]) -> &CStr {
12641264
// SAFETY: Casting to CStr is safe because its internal representation
12651265
// is a [u8] too (safe only inside std).

library/std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@
252252
#![feature(char_internals)]
253253
#![cfg_attr(not(bootstrap), feature(concat_bytes))]
254254
#![feature(concat_idents)]
255-
#![feature(const_cstr_unchecked)]
256255
#![feature(const_fn_floating_point_arithmetic)]
257256
#![feature(const_fn_fn_ptr_basics)]
258257
#![feature(const_fn_trait_bound)]

0 commit comments

Comments
 (0)