mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
f3b9d47a46
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. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |