Skip to content

Support intra-doc linking to () #144937

@kpreid

Description

@kpreid

Code

//! [`()`] is the best type ever!

Expected Outcome

A link to the unit type.

Actual Output

Dead link appearing as "[()]".

Version

rustdoc 1.89.0 (2948388 2025-08-04)
rustdoc 1.91.0-nightly (0060d5a 2025-08-04)

Additional Details

The link can be written as [`()`][primitive@unit] but I think this should not be necessary, since () is an unambiguous, non-generic type name.

@rustbot label +A-intra-doc-links

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