diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-13 18:15:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-13 18:15:17 +0100 |
| commit | ff214b745de20917b398510e78e7aba5afba9a72 (patch) | |
| tree | e50585e20fbc07bebfb8af538efcdadf480be456 /library/std/src | |
| parent | 84878336b05f1dcdff6f2a55b6b66d5fa6f2e82e (diff) | |
| parent | 23e4aeb14067b401bc2d11a4bbdb035ee7a4c81a (diff) | |
| download | rust-ff214b745de20917b398510e78e7aba5afba9a72.tar.gz rust-ff214b745de20917b398510e78e7aba5afba9a72.zip | |
Rollup merge of #91855 - xfix:const_cstr_unchecked, r=dtolnay
Stabilize const_cstr_unchecked Closes #90343 ``@rustbot`` modify labels: +T-libs-api
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/ffi/c_str.rs | 2 | ||||
| -rw-r--r-- | library/std/src/lib.rs | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/library/std/src/ffi/c_str.rs b/library/std/src/ffi/c_str.rs index 465bbae8631..9c1b79d6966 100644 --- a/library/std/src/ffi/c_str.rs +++ b/library/std/src/ffi/c_str.rs @@ -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). diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index d4ff642cd13..dabab667ee9 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -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)] |
