-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@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.