Closed
Description
I tried this code:
/// Links to [a] [twice][a]
///
/// [a]: not_found
pub fn f() {}
I expected to see this happen: Rustdoc warns once, because there is only one reference link.
Instead, this happened: Rustdoc warns twice, because there are multiple uses of the reference link.
warning: unresolved link to `not_found`
--> tmp.rs:3:10
|
3 | /// [a]: not_found
| ^^^^^^^^^ the module `tmp` contains no item named `not_found`
|
= note: `#[warn(broken_intra_doc_links)]` on by default
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
warning: unresolved link to `not_found`
--> tmp.rs:3:10
|
3 | /// [a]: not_found
| ^^^^^^^^^ the module `tmp` contains no item named `not_found`
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
Meta
rustdoc +nightly --version
: rustdoc 1.48.0-nightly (8fe73e8 2020-10-01)
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Intra-doc links, the ability to link to items in docs by nameCategory: This is a bug.Diagnostics: Too much output caused by a single piece of incorrect code.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Relevant to the rustdoc team, which will review and decide on the PR/issue.