Pass on the DefId so rustdoc can name it in suggestions
Look at this beauty: ```rust error: unresolved link to `S::h` --> intra-link-errors.rs:51:6 | 51 | /// [type@S::h] | ^^^^^^^^^ help: to link to the associated function, use its disambiguator: `S::h()` | = note: this link resolves to the associated function `h`, which is not in the type namespace ```
This commit is contained in:
parent
fcb21999a7
commit
42bed03500
3 changed files with 52 additions and 34 deletions
|
@ -49,11 +49,18 @@ pub struct S;
|
|||
pub enum E { A, B, C }
|
||||
|
||||
/// [type@S::h]
|
||||
//~^ ERROR unresolved link
|
||||
//~| HELP to link to the associated function
|
||||
//~| NOTE not in the type namespace
|
||||
impl S {
|
||||
pub fn h() {}
|
||||
}
|
||||
|
||||
/// [type@T::g]
|
||||
//~^ ERROR unresolved link
|
||||
//~| HELP to link to the associated function
|
||||
//~| NOTE not in the type namespace
|
||||
|
||||
/// [T::h!]
|
||||
pub trait T {
|
||||
fn g() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue