Uh oh!
There was an error while loading. Please reload this page.
Simplify for loop desugar - #90352
Conversation
rust-highfive
commented
Oct 27, 2021
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
rust-highfive
commented
Oct 27, 2021
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
Mark-Simulacrum
commented
Oct 27, 2021
@bors try @rust-timer queue |
bors
commented
Oct 27, 2021
⌛ Trying commit f91e0b1f918aa3b7f9ad897a742730fe50f5eee4 with merge 52f2d9b64faebfa33ae0fd45fcbf21bdc4154fa1... |
This comment has been minimized.
This comment has been minimized.
f91e0b1 to
b44eed9Comparecamsteffen
commented
Oct 27, 2021
@bors try @rust-timer queue |
rust-timer
commented
Oct 27, 2021
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Oct 27, 2021
⌛ Trying commit b44eed913416e05c2a5f889c4a10d9ab3421e035 with merge 261bc72edbd828cafa27c3450ef92a59b5e7bacb... |
petrochenkov
commented
Oct 27, 2021
@camsteffen |
@petrochenkov It looks like the key points of history are #42265 and #42634. I think these are workarounds for typeck/borrowck issues that no longer exist, especially with NLL? |
This comment has been minimized.
This comment has been minimized.
bors
commented
Oct 27, 2021
☀️ Try build successful - checks-actions |
rust-timer
commented
Oct 27, 2021
Queued 261bc72edbd828cafa27c3450ef92a59b5e7bacb with parent dd757b9, future comparison URL. |
rust-timer
commented
Oct 28, 2021
Finished benchmarking commit (261bc72edbd828cafa27c3450ef92a59b5e7bacb): comparison url. Summary: This change led to very large 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 |
There was a problem hiding this comment.
I don't know. Do you know how to see what changed?
There was a problem hiding this comment.
Perhaps it's an optimization of
match next {None => break,Some(..) => break,}Uh oh!
There was an error while loading. Please reload this page.
memoryruins
commented
Oct 28, 2021
rust/library/std/src/keyword_docs.rs Line 536 in 85c0558 |
c3c982d to
a60977bCompare51ee323 to
21a53d1Comparecamsteffen
commented
Nov 21, 2021
@bors r=oli-obk |
bors
commented
Nov 21, 2021
📌 Commit 21a53d1b1ba896d06534207402885fb93ffd1da9 has been approved by |
bors
commented
Nov 21, 2021
⌛ Testing commit 21a53d1b1ba896d06534207402885fb93ffd1da9 with merge 22453953cf17d8d767864fd79f96aeae798d6542... |
This comment has been minimized.
This comment has been minimized.
bors
commented
Nov 21, 2021
💔 Test failed - checks-actions |
21a53d1 to
66da8faComparecamsteffen
commented
Nov 21, 2021
@bors r=oli-obk |
bors
commented
Nov 21, 2021
📌 Commit 66da8fa has been approved by |
bors
commented
Nov 21, 2021
bors
commented
Nov 22, 2021
☀️ Test successful - checks-actions |
rust-timer
commented
Nov 22, 2021
Finished benchmarking commit (cebd2dd): comparison url. Summary: This change led to very large relevant mixed results 🤷 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 |
oli-obk
commented
Nov 22, 2021
@rustbot label: +perf-regression-triaged |
Basically two intermediate bindings are inlined. I could have left one intermediate binding in place as this would simplify some diagnostic logic, but I think the difference in that regard would be negligible, so it is better to have a minimal HIR.
For checking that the pattern is irrefutable, I added a special case when the
matchis found to be non-exhaustive.The reordering of the arms is purely stylistic. I don't think there are any perf implications.
match IntoIterator::into_iter($head) { mut iter => { $label: loop { - let mut __next; match Iterator::next(&mut iter) { - Some(val) => __next = val, None => break, + Some($pat) => $block, } - let $pat = __next;- $block } } }