Skip to content

Commit

Permalink
Stabilize const_cstr_unchecked
Browse files Browse the repository at this point in the history
  • Loading branch information
KamilaBorowska committed Dec 13, 2021
1 parent 4a7fb97 commit 23e4aeb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion compiler/rustc_codegen_llvm/src/lib.rs
Expand Up @@ -6,7 +6,6 @@

#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![feature(bool_to_option)]
#![feature(const_cstr_unchecked)]
#![feature(crate_visibility_modifier)]
#![feature(extern_types)]
#![feature(in_band_lifetimes)]
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/ffi/c_str.rs
Expand Up @@ -1259,7 +1259,7 @@ impl CStr {
#[inline]
#[must_use]
#[stable(feature = "cstr_from_bytes", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_cstr_unchecked", issue = "90343")]
#[rustc_const_stable(feature = "const_cstr_unchecked", since = "1.59.0")]
pub const unsafe fn from_bytes_with_nul_unchecked(bytes: &[u8]) -> &CStr {
// SAFETY: Casting to CStr is safe because its internal representation
// is a [u8] too (safe only inside std).
Expand Down
1 change: 0 additions & 1 deletion library/std/src/lib.rs
Expand Up @@ -252,7 +252,6 @@
#![feature(char_internals)]
#![cfg_attr(not(bootstrap), feature(concat_bytes))]
#![feature(concat_idents)]
#![feature(const_cstr_unchecked)]
#![feature(const_fn_floating_point_arithmetic)]
#![feature(const_fn_fn_ptr_basics)]
#![feature(const_fn_trait_bound)]
Expand Down

0 comments on commit 23e4aeb

Please sign in to comment.