Skip to content

Rustdoc source links should link into expanded macros rather than to the macro invocation #146007

@VorpalBlade

Description

@VorpalBlade

This is a followup from discussing PR #137229 on reddit.

Specially that PR added the ability to (unstably) expand macros in rustdoc source view. A great next step would be to have links from the docs to the source to go into the expanded macro. For example: the methods on u32 currently point to the macro invocation but could point into the expanded macro. This would make it a lot easier to see the source for the integer types and other types where it macros are used to define the impl blocks.

Cc @GuillaumeGomez

@rustbot label -C-bug

(Please fix the labels, I couldn't find a suitable template for this, so I selected rustdoc bug.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-searchArea: Rustdoc's search featureC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions