Don't do coroutine-closure-specific upvar analysis if tainted by errors#123834
Merged
bors merged 1 commit intorust-lang:masterfrom Apr 12, 2024
Merged
Conversation
Collaborator
Contributor
Author
|
r? oli-obk |
oli-obk
reviewed
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() |
Contributor
There was a problem hiding this comment.
Is there a more local thing you can check? args.errors_reported() or some other list that isn't item-global?
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
There was a problem hiding this comment.
Ah... yea that sadly makes sense
Contributor
|
@bors r+ rollup |
Collaborator
Contributor
Author
|
wait no i can change it im just away from my computer rn @bors r- |
5a1cd7d to
49e73c3
Compare
Contributor
Author
|
@bors r=oli-obk |
Collaborator
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See the comment
Fixes #123821
Fixes #123818