Uh oh!
There was an error while loading. Please reload this page.
Normalize obligation and expected trait_refs in confirm_poly_trait_refs - #94108
Conversation
This comment has been minimized.
This comment has been minimized.
056c3c5 to
3b1717eComparecompiler-errors
commented
Feb 18, 2022
Forgot to remove a deleted test stderr.. |
jackh726
commented
Feb 18, 2022
@bors try @rust-timer queue |
rust-timer
commented
Feb 18, 2022
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Feb 18, 2022
⌛ Trying commit 3b1717eea1995cb31c0bca26cc734354930a93b3 with merge 8bd972219e2ab01d74589bbc494630993b93c5a2... |
bors
commented
Feb 18, 2022
☀️ Try build successful - checks-actions |
rust-timer
commented
Feb 18, 2022
Queued 8bd972219e2ab01d74589bbc494630993b93c5a2 with parent 30b3f35, future comparison URL. |
rust-timer
commented
Feb 18, 2022
Finished benchmarking commit (8bd972219e2ab01d74589bbc494630993b93c5a2): comparison url. Summary: This benchmark run shows 1 relevant improvement 🎉 to instruction counts.
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 |
compiler-errors
commented
Feb 18, 2022
Interesting to see that this alone doesn't really improve perf other than one case, but when paired with the other fulfillment normalization PRs, it causes many cases to no longer regress like 1%. |
jackh726
commented
Feb 18, 2022
I think we can land this separately, but I need to review later. |
compiler-errors
commented
Feb 18, 2022
Cool, I will make it not a draft and give it a real title and description, then. |
r? @jackh726 (just for tracking purposes, no rush on the review) |
There was a problem hiding this comment.
This test highlights that something wonky is going on. It changes were we aren't able to normalize.
There was a problem hiding this comment.
Yeah, this is very interesting. Possibly due to changes in the ordering of resolving the inference variable in &mut <_ as Iterable>::Iterator<'a> and normalizing it. Now that we're eagerly normalizing the trait ref, we probably are substituting that value before we have a chance to unify the argument type with something else, possibly another projection type with an inference variable.
jackh726
commented
Feb 18, 2022
@bors r+ |
bors
commented
Feb 18, 2022
📌 Commit 3b1717eea1995cb31c0bca26cc734354930a93b3 has been approved by |
bors
commented
Feb 19, 2022
☔ The latest upstream changes (presumably #94134) made this pull request unmergeable. Please resolve the merge conflicts. |
jackh726
commented
Feb 19, 2022
@bors delegate+ |
bors
commented
Feb 19, 2022
✌️ @compiler-errors can now approve this pull request |
3b1717e to
b59c958Comparecompiler-errors
commented
Feb 19, 2022
@bors r=jackh726 |
bors
commented
Feb 19, 2022
📌 Commit b59c958 has been approved by |
bors
commented
Feb 21, 2022
bors
commented
Feb 21, 2022
☀️ Test successful - checks-actions |
rust-timer
commented
Feb 21, 2022
Finished benchmarking commit (a924ef7): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
CAD97
commented
Mar 7, 2022
Just FYI: this likely changed inference to (correctly) accept more cases: https://www.reddit.com/r/rust/comments/t8ifzy/type_inference_fails_on_stable_but_succeeds_on/?utm_medium=android_app&utm_source=share |
Consolidate normalization the obligation and expected trait refs in
confirm_poly_trait_refs. Also, always normalize these trait refs -- we were already normalizing the obligation trait ref when confirming closure and generator candidates, but this does it for fn pointer confirmation as well.This presumably does more work in the case that the obligation's trait ref is already normalized, but we can see from the perf runs in #94070, it actually (paradoxically, perhaps) improves performance when paired with logic that normalizes projections in fulfillment loop.