Closed
Description
openedon Mar 2, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment