rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
94.88k stars 12.23k forks source link

rustdoc: support for `async Fn*` trait bounds #127227

Open fmease opened 6 days ago

fmease commented 6 days ago

Source:

#![feature(async_closure)]

pub fn demo(_: impl async Fn() -> i32) {}

Current rendered output (local, etc. — more generally: HIR-based) below (issue: dropping the trait bound modifier async).

pub fn demo(_: impl Fn() -> i32)

Current rendered output (inlined cross-crate re-export, etc. — more generally: middle-based) below (issue: leaking the internal desugaring):

pub fn demo(_: impl AsyncFn<(), Output = i32>)

Tracking:

fmease commented 6 days ago

I consider this issue to be partially blocked: Please don't try to add async Fn* support for inlined cross-crate reexports — more generally: middle-based cleaning — before I fix #113015 (which should happen very soon!).