mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
cad8f8cbff
Inline strlen_rt in CStr::from_ptr This enables LLVM to optimize this function as if it was strlen (LLVM knows what it does, and can avoid calling it in certain situations) without having to enable std-aware LTO. This is essentially doing what https://github.com/rust-lang/rust/pull/90007 did, except updated for this function being `const`. Pretty sure it's safe to roll-up, considering last time I did make this change it didn't affect performance (`CStr::from_ptr` isn't really used all that often in Rust code that is checked by rust-perf). |
||
---|---|---|
.. | ||
benches | ||
primitive_docs | ||
src | ||
tests | ||
Cargo.toml |