-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Remove unnecessary SpecFromIter impls #85867
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
Remove unnecessary SpecFromIter impls #85867
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
Unfortunate that these aren't statically detected but I guess that's true of all (trait) impls... @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit c902fdc with merge 81b35bb706dcef83a467dfb93f9415cea94a3b09... |
☀️ Try build successful - checks-actions |
Queued 81b35bb706dcef83a467dfb93f9415cea94a3b09 with parent d9feaaa, future comparison URL. |
How did you determine that they're unused? They're specialization implementations, so they should be used for particular instances of an iterator. It looks like the last one is supposed to turn a |
The trait documentation would be outdated with this change rust/library/alloc/src/vec/spec_from_iter.rs Lines 16 to 25 in c902fdc
|
There are impls of the form
This doesn’t even compile. |
Good catch. I’ve added another commit changing those docs. |
Ah, I see. Looking through the history it looks this was originally used for the 👍 |
Finished benchmarking try commit (81b35bb706dcef83a467dfb93f9415cea94a3b09): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
@bors r+ |
📌 Commit 5ea3e73 has been approved by |
☀️ Test successful - checks-actions |
Unless I’m missing something, these
SpecFromIter<&'a T, …> for Vec<T>
implementations were completely unused.