-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Replace usages of vec![].into_iter with [].into_iter #92070
Replace usages of vec![].into_iter with [].into_iter #92070
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
|
@bors try @rust-timer queue to confirm perf is not worse (I expect roughly neutral to slight improvement, most likely) Thanks! |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit d04936a8a3d12e310d82d6cec02105b9b9712a65 with merge 321070819ae6a777a2fcf631205d23c330f693ad... |
This comment has been minimized.
This comment has been minimized.
Thanks! |
☀️ Try build successful - checks-actions |
Queued 321070819ae6a777a2fcf631205d23c330f693ad with parent d3f3004, future comparison URL. |
Finished benchmarking commit (321070819ae6a777a2fcf631205d23c330f693ad): comparison url. Summary: This change led to moderate relevant mixed results 🤷 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never |
d04936a
to
9885398
Compare
The build failures look like they will all be resolved by #92068 so i'll put this PR on hold until that lands. Not sure how the benchmarks successfully ran when the PR doesnt even build. |
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue mingw-check looks to be failing due to tests not building, which are not required to produce artifacts for try builds. Going to rerun the perf build since it looks like it might've been a little bit due to noise. |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 988539835929405f9b233ab5b17ed149bc9ce6f3 with merge f5a08fefa57a109a7b8253b284666479011847b4... |
☀️ Try build successful - checks-actions |
Queued f5a08fefa57a109a7b8253b284666479011847b4 with parent 5883b87, future comparison URL. |
Finished benchmarking commit (f5a08fefa57a109a7b8253b284666479011847b4): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf. @bors rollup=never |
37b9e61
to
478c13b
Compare
This comment has been minimized.
This comment has been minimized.
478c13b
to
0882985
Compare
Alright, this PR is ready for review again. |
Thanks -- this looks great to me now. @bors r+ |
📌 Commit 0882985 has been approved by |
Is there clippy lint for this? If no, maybe you create suggestion to add it? |
☀️ Test successful - checks-actions |
Finished benchmarking commit (2e2c86e): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
[].into_iter
is idiomatic overvec![].into_iter
because its simpler and faster (unless the vec is optimized away in which case it would be the same)So we should change all the implementation, documentation and tests to use it.
I skipped:
src/tools
- Those are copied in from upstreamsrc/test/ui
- Hard to tell ifvec![].into_iter
was used intentionally or not here and not much benefit to changing it.vec![].into_iter
was used because we specifically needed aVec::IntoIter<T>
vec![].into_iter
to test it.