Skip to content

Feature request: #[doc(canonical)] #3011

Description

@jyn514

I don't have time for a full write-up of this right now, so I'm just opening an issue so I have somewhere to point people when they open rustdoc issues.

Motivation:

doc(canonical) could tell rustdoc the 'one true path' the item should appear at.

Possible difficulties:

  • doc(canonical) is necessarily unique across all crates. rustdoc should give an error if it's duplicated.
  • rustdoc currently stores search-index.json per-crate. This will need a redesign if rustdoc only know to hide the item after the documentation has been generated and it goes onto the next crate

Unresolved questions:

  • Does inlining still make sense with doc(canonical)? Should all other usages just link to the canonical crate? How does this work if the canonical usage is in a reverse-dependency?

cc @camelid

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-rustdocRelevant to rustdoc team, which will review and decide on the RFC.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions