Skip to content

rustdoc creates links to doc(hidden) associated type #151454

@RalfJung

Description

@RalfJung

This came up in #151365 if one takes just the first commit: the link checker started complaining about some rustdoc-generated files.

	core/marker/trait.UnsafeUnpin.html:124: broken link fragment `#associatedtype.NonZeroInner` pointing to `core/num/trait.ZeroablePrimitive.html`
	core/num/struct.NonZero.html:3880: broken link fragment `#associatedtype.NonZeroInner` pointing to `core/num/trait.ZeroablePrimitive.html`
	std/marker/trait.UnsafeUnpin.html:195: broken link fragment `#associatedtype.NonZeroInner` pointing to `std/num/trait.ZeroablePrimitive.html`
	std/num/struct.NonZero.html:4108: broken link fragment `#associatedtype.NonZeroInner` pointing to `std/num/trait.ZeroablePrimitive.html`

NonZeroInner is a doc(hidden) associated type of the ZeroablePrimitive trait. It seems like the changes in this commit cause rustdoc to render trait instances that refer to this associated type, with links to the type definition, but since the type is hidden those links are dangling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameC-bugCategory: This is a bug.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