-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Normalize return type of deduce_future_output_from_obligations
#114914
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
Normalize return type of deduce_future_output_from_obligations
#114914
Conversation
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.
r=me after handling nit (or without it 😁)
"async fn generator return type not an inference variable: {ret_ty}" | ||
), | ||
}; | ||
|
||
let output_ty = self.normalize(span, output_ty); |
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.
can you move the normalize
call into the ty::Alias
branch? for infer vars the obligation should already be normalized
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.
That's the alias that corresponds to the impl Future
. The type we want to normalize here is the Output
of that future, which depends on what we extract out of get_future_output
.
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.
Wait, wait, I think I understand here.
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.
Actually, we still may have unnormalized obligations for infer vars as well. The obligations returned from replace_opaque_with_infer
and handle_opaque_ty
are not normalized.
@bors r=lcnr |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (39e0749): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 635.452s -> 636.001s (0.09%) |
Fixes #114909
Also confirmed to fix #114727 manually
Now that we have weak/lazy type aliases, we need to normalize those in future signatures to ensure that
replace_opaque_types_with_inference_vars
actually sees TAITs behind them. This isn't needed in the new solver, but added a test to make sure it doesn't regress there either.r? types cc @oli-obk (who's gone, worst case can delay this PR until he's back)