We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0768872 commit e94ba4aCopy full SHA for e94ba4a
library/core/src/ffi/c_str.rs
@@ -253,7 +253,7 @@ impl CStr {
253
/// ```
254
///
255
/// [valid]: core::ptr#safety
256
- #[inline]
+ #[inline] // inline is necessary for codegen to see strlen.
257
#[must_use]
258
#[stable(feature = "rust1", since = "1.0.0")]
259
#[rustc_const_unstable(feature = "const_cstr_from_ptr", issue = "113219")]
@@ -280,6 +280,8 @@ impl CStr {
280
len
281
}
282
283
+ // `inline` is necessary for codegen to see strlen.
284
+ #[inline]
285
fn strlen_rt(s: *const c_char) -> usize {
286
extern "C" {
287
/// Provided by libc or compiler_builtins.
0 commit comments