Skip to content

Prereq3 for async drop - LangItem registration for async_drop_in_place()::{{closure0}} #129737

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

Conversation

azhogin
Copy link
Contributor

@azhogin azhogin commented Aug 29, 2024

This is subpart 3 PR of #123948, just for review purposes.
We have async_drop_in_place lang item for async fn async_drop_in_place<T>(...).

#[lang = "async_drop_in_place"]
pub async unsafe fn async_drop_in_place<T: ?Sized>(_to_drop: *mut T) { ... }

But we also need to generate shim for its returning value - coroutine async_drop_in_place<T>::{{closure0}}.
So, we need to bind some lang item to it. This patch registers LangItem::AsyncDropInPlacePoll for coroutine, when its constructor function is LangItem::AsyncDropInPlace.

Review only last commit, based on previous PR #129736

@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. labels Aug 29, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 29, 2024

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

This PR changes Stable MIR

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

This PR changes MIR

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

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@azhogin azhogin marked this pull request as draft August 30, 2024 07:24
@azhogin azhogin force-pushed the azhogin/async-drop-prereq3-lang-item-for-drop-poll branch from 7a0329a to 3c5bee0 Compare August 30, 2024 07:27
@azhogin azhogin force-pushed the azhogin/async-drop-prereq3-lang-item-for-drop-poll branch 2 times, most recently from d8c1a84 to 50aea7e Compare September 8, 2024 12:02
@bors
Copy link
Collaborator

bors commented Sep 23, 2024

☔ The latest upstream changes (presumably #130724) 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
@azhogin azhogin force-pushed the azhogin/async-drop-prereq3-lang-item-for-drop-poll branch from 50aea7e to c561fb9 Compare February 9, 2025 11:46
@bors
Copy link
Collaborator

bors commented Feb 9, 2025

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

@azhogin azhogin force-pushed the azhogin/async-drop-prereq3-lang-item-for-drop-poll branch from c561fb9 to 3534899 Compare February 10, 2025 14:08
@bors
Copy link
Collaborator

bors commented Feb 12, 2025

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

@@ -191,6 +191,7 @@ language_item_table! {
AsyncDrop, sym::async_drop, async_drop_trait, Target::Trait, GenericRequirement::Exact(0);
AsyncDestruct, sym::async_destruct, async_destruct_trait, Target::Trait, GenericRequirement::Exact(0);
AsyncDropInPlace, sym::async_drop_in_place, async_drop_in_place_fn, Target::Fn, GenericRequirement::Exact(1);
AsyncDropInPlacePoll, sym::async_drop_in_place_poll, async_drop_in_place_poll_fn, Target::Closure, GenericRequirement::Exact(1);
Copy link
Contributor

@oli-obk oli-obk Mar 12, 2025

Choose a reason for hiding this comment

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

EDIT: nevermind I misunderstood.

Uh... that's a fancy lang item. I'll need to think about this

@azhogin azhogin force-pushed the azhogin/async-drop-prereq3-lang-item-for-drop-poll branch from 3534899 to 9438880 Compare March 30, 2025 16:58
@bors
Copy link
Collaborator

bors commented Apr 5, 2025

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

@azhogin azhogin force-pushed the azhogin/async-drop-prereq3-lang-item-for-drop-poll branch from 9438880 to f50379a Compare April 6, 2025 07:59
@azhogin azhogin force-pushed the azhogin/async-drop-prereq3-lang-item-for-drop-poll branch from f50379a to 900a391 Compare April 6, 2025 10:03
@bors
Copy link
Collaborator

bors commented Apr 25, 2025

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

@oli-obk oli-obk closed this Apr 25, 2025
# for free to join this conversation on GitHub. Already have an account? # 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants