Skip to content

rustdoc: terse diagnostic on malformed intra-doc link (single instead of double colon) #141095

Open
@sanbox-irl

Description

@sanbox-irl

Problem

I wrote:

[\`TextManager:atlases\`]

but I meant to write TextManager::atlases

The error I got was:

warning: unresolved link to `TextManager:atlases`

But a better error (for my case) would have been referencing that I was missing a semicolon.

Proposed Solution

Since I believe any item cannot have a single : in it, I propose the error should just lint for any illegal characters in a path.

I understand this might be more complex because of partial paths, but I am not familiar enough with those to address them here.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameC-feature-requestCategory: A feature request, i.e: not implemented / a PR.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