-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Register normalization obligations instead of immediately normalizing in opaque type instantiation #89045
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
Register normalization obligations instead of immediately normalizing in opaque type instantiation #89045
Conversation
use super::InferCtxt; | ||
|
||
impl<'a, 'tcx> InferCtxt<'a, 'tcx> { | ||
pub fn infer_projection( |
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.
Comment please =) What is the purpose of this function?
r=me once comment is added |
@bors r=nikomatsakis |
📌 Commit fc75914ae52f86e856bb32079caf75dde704bda7 has been approved by |
☔ The latest upstream changes (presumably #88980) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors try @rust-timer queue |
🙅 Please do not |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
@bors r- |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
…unresolved associated types
…es instead of trying to normalize them.
This reduces unhelpful diagnostics down the road.
fc75914
to
afb7472
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit afb7472 with merge e5e1870d75756ab1996687c3b9ebe7af4122c036... |
☀️ Try build successful - checks-actions |
Queued e5e1870d75756ab1996687c3b9ebe7af4122c036 with parent db1fb85, future comparison URL. |
Finished benchmarking commit (e5e1870d75756ab1996687c3b9ebe7af4122c036): comparison url. Summary: This change led to small 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 |
📌 Commit afb7472 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (dda2a0e): 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 |
For lazy TAIT we will need to instantiate opaque types from within
rustc_infer
, which cannot invoke normalization methods (they are inrustc_trait_resolution
). So before we move the logic over torustc_infer
, we need make sure no normalization happens anymore. This PR resolves that by just registering normalization obligations and continuing.This PR is best reviewed commit by commit
I also included f7ad36e which is just an independent cleanup that touches the same code and reduces diagnostics noise a bit
r? @nikomatsakis cc @spastorino