Use spare_capacity_mut instead of invalid unchecked indexing when joining str#91680
Conversation
|
r? @yaahc (rust-highfive has picked a reviewer for you, use r? to override) |
|
@bors r+ |
|
📌 Commit 14f4ffa has been approved by |
|
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
…, r=dtolnay Use spare_capacity_mut instead of invalid unchecked indexing when joining str This is a fix for rust-lang#91574 I think in general I'd prefer to see this code implemented with raw pointers or `MaybeUninit::write_slice`, but there's existing code in here based on copying from slice to slice, so converting everything from `&[T]` to `&[MaybeUninit<T>]` is less disruptive.
|
@bors rollup=never might be perf sensitive |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (7ca74ea): comparison url. Summary: This change led to very large relevant regressions 😿 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression |
This is a fix for #91574
I think in general I'd prefer to see this code implemented with raw pointers or
MaybeUninit::write_slice, but there's existing code in here based on copying from slice to slice, so converting everything from&[T]to&[MaybeUninit<T>]is less disruptive.