-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Do not call query to compute coroutine layout for synthetic body of async closure #129847
Merged
Conversation
This file contains 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
r? @davidtwco rustbot has assigned @davidtwco. Use |
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
Sep 1, 2024
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
This comment has been minimized.
This comment has been minimized.
compiler-errors
force-pushed
the
async-cycle
branch
from
September 1, 2024 10:13
d1abd41
to
384aed8
Compare
davidtwco
approved these changes
Sep 6, 2024
@bors r+ |
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
Sep 6, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 7, 2024
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#126452 (Implement raw lifetimes and labels (`'r#ident`)) - rust-lang#129555 (stabilize const_float_bits_conv) - rust-lang#129594 (explain the options bootstrap passes to curl) - rust-lang#129677 (Don't build by-move body when async closure is tainted) - rust-lang#129847 (Do not call query to compute coroutine layout for synthetic body of async closure) - rust-lang#129869 (add a few more crashtests) - rust-lang#130009 (rustdoc-search: allow trailing `Foo ->` arg search) - rust-lang#130046 (str: make as_mut_ptr and as_bytes_mut unstably const) - rust-lang#130047 (Win: Add dbghelp to the list of import libraries) - rust-lang#130059 (Remove the unused `llvm-skip-rebuild` option from x.py) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 8, 2024
Rollup merge of rust-lang#129847 - compiler-errors:async-cycle, r=davidtwco Do not call query to compute coroutine layout for synthetic body of async closure There is code in the MIR validator that attempts to prevent query cycles when inlining a coroutine into itself, and will use the coroutine layout directly from the body when it detects that's the same coroutine as the one that's being validated. After rust-lang#128506, this logic didn't take into account the fact that the coroutine def id will differ if it's the "by-move body" of an async closure. This PR implements that. Fixes rust-lang#129811
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Sep 14, 2024
Don't call closure_by_move_body_def_id on FnOnce async closures in MIR validation Refactors the check in rust-lang#129847 to not unncessarily call the `closure_by_move_body_def_id` query for async closures that don't *need* a by-move body. Fixes rust-lang#130167
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 14, 2024
Rollup merge of rust-lang#130199 - compiler-errors:by-move, r=cjgillot Don't call closure_by_move_body_def_id on FnOnce async closures in MIR validation Refactors the check in rust-lang#129847 to not unncessarily call the `closure_by_move_body_def_id` query for async closures that don't *need* a by-move body. Fixes rust-lang#130167
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.
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.
There is code in the MIR validator that attempts to prevent query cycles when inlining a coroutine into itself, and will use the coroutine layout directly from the body when it detects that's the same coroutine as the one that's being validated. After #128506, this logic didn't take into account the fact that the coroutine def id will differ if it's the "by-move body" of an async closure. This PR implements that.
Fixes #129811