Open
Description
I tried this code:
rust/compiler/rustc_session/src/options.rs
Lines 97 to 104 in 9d170be
I expected to see this happen: Rustdoc shows the line number of the broken link, like it does normally:
warning: unresolved link to `x`
--> src/lib.rs:1:6
|
1 | //! [x]
| ^ no item named `x` in scope
|
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
Instead, this happened:
Documenting rustc_session v0.0.0 (/checkout/compiler/rustc_session)
error: unresolved link to `TRACKED`
--> compiler/rustc_session/src/options.rs:61:12
|
61 | $( #[$top_level_attr] )*
...
...
97 | / top_level_options!(
99 | | ///
99 | | ///
100 | | /// For each option, one has to specify how it behaves with regard to the
201 | | }
202 | | );
| |__- in this macro invocation
|
|
= note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`
= note: the link appears in this line:
[TRACKED]
^^^^^^^
= note: no item named `TRACKED` in scope
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
Meta
rustc --version --verbose
:
Originally posted by @rust-log-analyzer in #84233 (comment)