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

Prereq6 for async drop - templated coroutine processing and layout #129741

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

azhogin
Copy link
Contributor

@azhogin azhogin commented Aug 29, 2024

This is subpart 6 PR of #123948, just for review purposes.

For async_drop_in_place<T>(dropee)::{{closure0}} we need to perform shim codegen already with dropee type substituted.
To generate async drop glue we are generating sync-like drop glue using drop elaboration and then applying StateTransform pass to convert it into coroutine poll function. This coroutine has completely different layout dependent of dropee T, so it cannot be represented by generic coroutine with later T substitution (after codegen).

AsyncDropInPlacePoll lang item coroutine is considered as templated and will be codegen'ed already with GenericArgs substituted.

Review only last commit, based on previous PR #129740

@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative labels Aug 29, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 29, 2024

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

This PR changes Stable MIR

cc @oli-obk, @celinval, @ouz-a

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras

@RalfJung
Copy link
Member

RalfJung commented Aug 29, 2024

Can you please mark these PRs as "draft" (before creating them, i.e. in the PR creation dialog), so that the bot doesn't ping dozens of people for each of them? :)

@azhogin azhogin mentioned this pull request Aug 29, 2024
@azhogin azhogin marked this pull request as draft August 30, 2024 09:30
@azhogin azhogin force-pushed the azhogin/async-drop-prereq6-templated-coroutine branch from 4c1f383 to 0ac2aaa Compare August 30, 2024 11:25
@azhogin azhogin force-pushed the azhogin/async-drop-prereq6-templated-coroutine branch from 0ac2aaa to b75340f Compare September 7, 2024 15:33
@rust-log-analyzer

This comment has been minimized.

@azhogin azhogin force-pushed the azhogin/async-drop-prereq6-templated-coroutine branch from b75340f to 43051ca Compare September 7, 2024 19:19
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Sep 8, 2024

☔ The latest upstream changes (presumably #130091) made this pull request unmergeable. Please resolve the merge conflicts.

@azhogin azhogin force-pushed the azhogin/async-drop-prereq6-templated-coroutine branch from 43051ca to 64e4cca Compare September 8, 2024 15:10
@azhogin azhogin force-pushed the azhogin/async-drop-prereq6-templated-coroutine branch from 64e4cca to 85587cd Compare September 8, 2024 22:59
@bors
Copy link
Contributor

bors commented Sep 9, 2024

☔ The latest upstream changes (presumably #130165) made this pull request unmergeable. Please resolve the merge conflicts.

@davidtwco
Copy link
Member

r? @nikomatsakis is going to look into this

@rustbot rustbot assigned nikomatsakis and unassigned davidtwco Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants