Skip to content

rustdoc: support for async Fn* trait bounds #127227

Open

Description

@fmease

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:

Activity

  1. added
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    C-bugCategory: This is a bug.
    on Jul 1, 2024
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 1, 2024
  3. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 1, 2024
  4. fmease commented on Jul 1, 2024

    @fmease
    MemberAuthor

    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!).

  5. fmease commented on Jul 12, 2024

    @fmease
    MemberAuthor

    Blocking this on for<> async vs. async for<>: #127054 (in lang-FCP-merge)
    @rustbot blocked

  6. rustbot commented on Jul 12, 2024

    @rustbot
  7. added
    S-blockedStatus: Blocked on something else such as an RFC or other implementation work.
    on Jul 12, 2024
  8. added a commit that references this issue on Dec 13, 2024
  9. added
    P-lowLow priority
    requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.
    and removed
    P-lowLow priority
    S-blockedStatus: Blocked on something else such as an RFC or other implementation work.
    on Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-async-closures`async || {}`C-bugCategory: This is a bug.F-async_trait_bounds`#![feature(async_trait_bounds]`T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions