Skip to content

Commit 623c3e1

Browse files
authored
Rollup merge of #90344 - xfix:tracking-issue-const_cstr_unchecked, r=Mark-Simulacrum
Add tracking issue number to const_cstr_unchecked Also created a tracking issue, see #90343. I think it makes sense to stabilize this somewhat soon considering abuse of `transmute` to have this feature in constants, see https://crates.io/crates/cstr for an example. Code can be rewritten to use `mem::transmute` to work on stable.
2 parents f32c09b + 50ca08c commit 623c3e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/ffi/c_str.rs

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

0 commit comments

Comments
 (0)