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 do coroutine-closure-specific upvar analysis if tainted by errors #123834

Merged

Conversation

compiler-errors
Copy link
Member

See the comment

Fixes #123821
Fixes #123818

@rustbot
Copy link
Collaborator

rustbot commented Apr 12, 2024

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 12, 2024
@compiler-errors
Copy link
Member Author

r? oli-obk

@rustbot rustbot assigned oli-obk and unassigned BoxyUwU Apr 12, 2024
if let UpvarArgs::CoroutineClosure(args) = args
// Don't do this if we are tainted by errors, because fallback causes us
// to fail to infer upvars for the outer coroutine-closure.
&& self.tainted_by_errors().is_none()
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a more local thing you can check? args.errors_reported() or some other list that isn't item-global?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, we can check for ReError in the args instead (we just need to resolve vars) -- I was just using the same criteria as used in fallback.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah... yea that sadly makes sense

@oli-obk
Copy link
Contributor

oli-obk commented Apr 12, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 12, 2024

📌 Commit 5a1cd7d has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 12, 2024
@compiler-errors
Copy link
Member Author

wait no i can change it im just away from my computer rn

@bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 12, 2024
@compiler-errors
Copy link
Member Author

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Apr 12, 2024

📌 Commit 49e73c3 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 12, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 12, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#123654 (typeck: fix `?` suggestion span)
 - rust-lang#123807 (Remove `sys_common::thread`)
 - rust-lang#123834 (Don't do coroutine-closure-specific upvar analysis if tainted by errors)
 - rust-lang#123847 (Suppress `let else` suggestion for uninitialized refutable `let`s)
 - rust-lang#123857 (std::net: TcpListener shrinks the backlog argument to 32 for Haiku.)
 - rust-lang#123858 (zkvm: fix path to cmath in zkvm module)
 - rust-lang#123867 (Add `unsafe` to two functions with safety invariants)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1524fe0 into rust-lang:master Apr 12, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 12, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 12, 2024
Rollup merge of rust-lang#123834 - compiler-errors:async-closure-with-tainted-body, r=oli-obk

Don't do coroutine-closure-specific upvar analysis if tainted by errors

See the comment

Fixes rust-lang#123821
Fixes rust-lang#123818
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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: we captured CapturedPlace .. but it was not used in the child coroutine? ICE: leftover child captures?
5 participants