Skip to content

rustdoc: Expandable function code snippets #21346

Closed
@Qard

Description

@Qard

Rather than just having the current [src] link at the top of the doc pages, it'd be nice to be able to have a [src] link for each function that expands with a code snippet of that particular function. Just like what the [-] and [+] buttons already do for the markdown comments.

It'd be a really helpful learning tool to be able to jump directly to the code you want to use and see what it's actually doing behind the scenes. It could also help people to get acquainted enough with the core code base to start making useful contributions. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions