Skip to content

rustdoc does not warn about broken links if they contain . or [] #54191

@whatisaphone

Description

@whatisaphone

I got a PR yesterday that included something like this:

/// The tour de force of my career is [`foo.bar()`]
pub mod foo {
    pub fn bar() {}
}

In the current nightly rustdoc, foo.bar() neither resolves nor warns:

Our CI with --deny warnings did not catch this mistake (although I did 😄). I think rustdoc should trigger intra-doc-link-resolution-failure for this case.

Metadata

Metadata

Assignees

Labels

A-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