Closed
Description
I tried this code:
/// docs [label][with#anchor#error]
pub struct S;
I expected to see this happen: rustdoc outputs a single warning that only 1 anchor is allowed
Instead, this happened: rustdoc outputs the same warning twice in a row:
warning: `[with#anchor#error]` has an issue with the link anchor.
--> $DIR/reference-link-has-one-warning.rs:3:18
|
LL | /// docs [label][with#anchor#error]
| ^^^^^^^^^^^^^^^^^ only one `#` is allowed in a link
|
= note: `#[warn(intra_doc_link_resolution_failure)]` on by default
warning: `[with#anchor#error]` has an issue with the link anchor.
--> $DIR/reference-link-has-one-warning.rs:3:18
|
LL | /// docs [label][with#anchor#error]
| ^^^^^^^^^^^^^^^^^ only one `#` is allowed in a link
warning: 2 warnings emitted
Meta
rustc --version --verbose
:
<version>
@rustbot modify labels: T-rustdoc A-intra-doc-links