diagnostics: if AssocFn has self argument, describe as method
Discussed in
329265515
This commit also changes the tooltips on rustdoc intra-doc links
targeting methods.
This commit is contained in:
parent
3b4d6e0804
commit
3d056c3125
25 changed files with 91 additions and 58 deletions
|
@ -775,7 +775,7 @@ pub(crate) fn link_tooltip(did: DefId, fragment: &Option<UrlFragment>, cx: &Cont
|
|||
let fqp = fqp.iter().map(|sym| sym.as_str()).join("::");
|
||||
if let &Some(UrlFragment::Item(id)) = fragment {
|
||||
let name = cx.tcx().item_name(id);
|
||||
let descr = cx.tcx().def_kind(id).descr(id);
|
||||
let descr = cx.tcx().def_descr(id);
|
||||
format!("{descr} {fqp}::{name}")
|
||||
} else {
|
||||
format!("{shortty} {fqp}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue