Skip to content
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

Don't ICE when we have leftover child captures due to ambiguous closure params #124525

Closed

Conversation

compiler-errors
Copy link
Member

In the ExprUseVisitor, we bail out when we encounter infer types. That means that the captures that we pass into analyze_coroutine_closure_captures aren't actually lined up correctly, and we ICE. Turn this into a delayed bug.

Fixes #123901
r? oli-obk

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 29, 2024
@rustbot
Copy link
Collaborator

rustbot commented Apr 29, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rust-log-analyzer

This comment has been minimized.

Comment on lines +6 to +9
async |unconstrained| {
//~^ ERROR type annotations needed
(test,)
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error is not very helpful to users. Can we link the inference variable of the coroutine with the one of the unconstrained argument?

@oli-obk
Copy link
Contributor

oli-obk commented May 2, 2024

r=me with some improvement to the diagnostic or at least an issue open and linked from the tracking issue

@oli-obk oli-obk added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 2, 2024
@compiler-errors
Copy link
Member Author

No longer necessary since #124902.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: leftover child captures?
4 participants