-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Don't do coroutine-closure-specific upvar analysis if tainted by errors #123834
Conversation
r? oli-obk |
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() |
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.
Is there a more local thing you can check? args.errors_reported()
or some other list that isn't item-global?
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.
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.
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.
Ah... yea that sadly makes sense
@bors r+ rollup |
wait no i can change it im just away from my computer rn @bors r- |
5a1cd7d
to
49e73c3
Compare
@bors r=oli-obk |
…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
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
See the comment
Fixes #123821
Fixes #123818