Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#136099 - Kijewski:pr-rc-str-default, r=ibraheemdev Optimize `Rc::<str>::default()` implementation This PR lets `impl Default for Rc<str>` re-use the implementation for `Rc::<[u8]>::default()`. The previous version only calculted the memory layout at runtime, even though it should be known at compile time, resulting in an additional function call. The same optimization is done for `Rc<CStr>`. Generated byte code: <https://godbolt.org/z/dfq73jsoP>. Resolves <rust-lang#135784>. Cc `@Billy-Sheppard.`
- Loading branch information