-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I tried this code:
rust/compiler/rustc_session/src/options.rs
Lines 97 to 104 in 9d170be
top_level_options!( | |
/// The top-level command-line options struct. | |
/// | |
/// For each option, one has to specify how it behaves with regard to the | |
/// dependency tracking system of incremental compilation. This is done via the | |
/// square-bracketed directive after the field type. The options are: | |
/// | |
/// [TRACKED] |
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)
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.