-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-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
Code
/// [`Trait::IDENT`]
trait Trait {
type IDENT;
const IDENT: usize;
}
Run cargo doc
Current output
warning: `Trait::IDENT` is both a trait and a trait
--> src/main.rs:1:7
|
1 | /// [`Trait::IDENT`]
| ^^^^^^^^^^^^ ambiguous link
|
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
help: to link to the trait, prefix with `trait@`
|
1 | /// [`trait@Trait::IDENT`]
| ++++++
help: to link to the trait, prefix with `trait@`
|
1 | /// [`trait@Trait::IDENT`]
| ++++++
warning: `doc_` (bin "doc_" doc) generated 1 warning
Desired output
warning: `Trait::IDENT` is both a const and a type
--> src/main.rs:1:7
|
1 | /// [`Trait::IDENT`]
| ^^^^^^^^^^^^ ambiguous link
|
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
help: to link to the const, prefix with `const@`
|
1 | /// [`const@Trait::IDENT`]
| ++++++
help: to link to the type, prefix with `type@`
|
1 | /// [`type@Trait::IDENT`]
| ++++++
warning: `doc_` (bin "doc_" doc) generated 1 warning
Rationale and extra context
No response
Other cases
No response
Anything else?
No response
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-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.