Skip to content

[rustdoc] intra-doc links for macros always resolve relative to the crate root #72243

Closed
@Lokathor

Description

@Lokathor

If you have a function defined within a module it will use that module's imports to determine link resolution for intra-doc links in the documentation.

If you do the same with a macro, it seems to "scope" the macro (and thus its intra-doc links) at the crate root only, so the macro's documentation can't benefit from the local imports.

This feels inconsistent, and can it be fixed so that macro intra-links get the local imports for their resolution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-enhancementCategory: An issue proposing an enhancement or a PR with one.I-needs-decisionIssue: In need of a decision.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