rust/compiler/rustc_ast_lowering
bors f3b9d47a46 Auto merge of #120392 - compiler-errors:async-bound-modifier, r=davidtwco,fmease
Introduce support for `async` bound modifier on `Fn*` traits

Adds `async` to the list of `TraitBoundModifiers`, which instructs AST lowering to map the trait to an async flavor of the trait. For now, this is only supported for `Fn*` to `AsyncFn*`, and I expect that this manual mapping via lang items will be replaced with a better system in the future.

The motivation for adding these bounds is to separate the users of async closures from the exact trait desugaring of their callable bounds. Instead of users needing to be concerned with the `AsyncFn` trait, they should be able to write `async Fn()` and it will desugar to whatever underlying trait we decide is best for the lowering of async closures.

Note: rustfmt support can be done in the rustfmt repo after a subtree sync.
2024-02-06 00:45:11 +00:00
..
src Auto merge of #120392 - compiler-errors:async-bound-modifier, r=davidtwco,fmease 2024-02-06 00:45:11 +00:00
Cargo.toml Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
messages.ftl Error on incorrect item kind in async bound 2024-01-31 16:59:19 +00:00