Skip to content

rustdoc: Link references are case-insensitive #80882

Open

Description

EDIT(camelid): This is not an intra-doc links issue. See #80882 (comment).


I found a glitch in the std/core library docs. The docs for PartialEq contain this snippet:

/// This trait allows for partial equality, for types that do not have a full
/// equivalence relation. For example, in floating point numbers `NaN != NaN`,
/// so floating point types implement `PartialEq` but not [`Eq`].

At present, the Eq link has the wrong target, because rustdoc links it to the method eq instead.

I sent a PR that forces the correct linkage (#80864) for this instance, but perhaps rustdoc could be smarter here?

On that PR @jyn514 writes:

This is a bug in rustdoc for several reasons:

  • It shouldn't treat identifiers as case-insensitive
  • It should give a warning if the link is ambiguous
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-markdown-parsingArea: Markdown parsing for doc-commentsC-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