Skip to content

async closure coroutine by move body MirPass refactoring #123668

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 5 commits into from
Apr 10, 2024

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Apr 9, 2024

Unsure about the last commit, but I think the other changes help in simplifying the control flow

@rustbot

This comment was marked as resolved.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 9, 2024
@rustbot
Copy link
Collaborator

rustbot commented Apr 9, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 9, 2024
@oli-obk

This comment was marked as resolved.

@@ -233,6 +233,7 @@ impl<'tcx> MirPass<'tcx> for ByMoveBody {
let mut by_move_body = body.clone();
MakeByMoveBody { tcx, field_remapping, by_move_coroutine_ty }.visit_body(&mut by_move_body);
dump_mir(tcx, false, "coroutine_by_move", &0, &by_move_body, |_, _| Ok(()));
// FIXME: use query feeding to generate the body right here and then only store the ``DefId` of the new body.`
Copy link
Member

Choose a reason for hiding this comment

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

backticks

@compiler-errors
Copy link
Member

So this is gonna conflict w/ 8af94ce, where I pulled this out into a helper. I could adapt that to iterate over the child rather than the parent, but it doesn't seem to be much cleaner at that point.

@compiler-errors
Copy link
Member

I guess it's fine though, and I can just rebase on top of this.

r=me with the backticks fixed

@compiler-errors
Copy link
Member

@rustbot author

@rustbot rustbot 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 Apr 9, 2024
@oli-obk oli-obk force-pushed the by_move_body_golfing branch from 6ab363c to e14e795 Compare April 9, 2024 19:51
@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 9, 2024

@bors r=compiler-errors

@bors
Copy link
Collaborator

bors commented Apr 9, 2024

📌 Commit e14e795 has been approved by compiler-errors

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 9, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 10, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#121884 (Port exit-code run-make test to use rust)
 - rust-lang#122200 (Unconditionally show update nightly hint on ICE)
 - rust-lang#123568 (Clean up tests/ui by removing `does-nothing.rs`)
 - rust-lang#123609 (Don't use bytepos offsets when computing semicolon span for removal)
 - rust-lang#123612 (Set target-abi module flag for RISC-V targets)
 - rust-lang#123633 (Store all args in the unsupported Command implementation)
 - rust-lang#123668 (async closure coroutine by move body MirPass refactoring)

Failed merges:

 - rust-lang#123701 (Only assert for child/parent projection compatibility AFTER checking that theyre coming from the same place)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit df068db into rust-lang:master Apr 10, 2024
11 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 10, 2024
Rollup merge of rust-lang#123668 - oli-obk:by_move_body_golfing, r=compiler-errors

async closure coroutine by move body MirPass refactoring

Unsure about the last commit, but I think the other changes help in simplifying the control flow
@rustbot rustbot added this to the 1.79.0 milestone Apr 10, 2024
@oli-obk oli-obk deleted the by_move_body_golfing branch April 10, 2024 04:50
# for free to join this conversation on GitHub. Already have an account? # 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.

5 participants