We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1603a70 commit de95117Copy full SHA for de95117
library/core/src/ffi/c_str.rs
@@ -387,6 +387,7 @@ impl CStr {
387
#[rustc_const_stable(feature = "const_cstr_unchecked", since = "1.59.0")]
388
#[rustc_allow_const_fn_unstable(const_eval_select)]
389
pub const unsafe fn from_bytes_with_nul_unchecked(bytes: &[u8]) -> &CStr {
390
+ #[inline]
391
fn rt_impl(bytes: &[u8]) -> &CStr {
392
// Chance at catching some UB at runtime with debug builds.
393
debug_assert!(!bytes.is_empty() && bytes[bytes.len() - 1] == 0);
0 commit comments