Skip to content

Add AsyncFn* to the prelude in all editions#132611

Merged
bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:async-prelude
Nov 24, 2024
Merged

Add AsyncFn* to the prelude in all editions#132611
bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:async-prelude

Conversation

@compiler-errors

@compiler-errors compiler-errors commented Nov 4, 2024

Copy link
Copy Markdown
Contributor

The general vibe is that we will most likely stabilize the feature(async_closure) without the async Fn() trait bound modifier.

Without async Fn() bound syntax, this necessitates users to spell the bound like AsyncFn(). Since core::ops::AsyncFn is not in the prelude, users will need to import these any time they actually want to use the trait. This seems annoying, so let's add these traits to the prelude unstably.

We're trying to work on the general vision of async trait bound modifier in general in: rust-lang/rfcs#3710, however that RFC still needs more time for consensus to converge, and we've decided that the value that users get from calling the bound async Fn() is not really worth blocking landing async closures in general.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.