rust/compiler/rustc_parse
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 Update to bitflags 2 in the compiler 2023-12-30 18:17:28 +01:00
messages.ftl Better error message in ed 2015 2024-01-31 16:59:19 +00:00