1
Fork 0

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:
Michael Howell 2023-02-21 14:05:32 -07:00
parent 3b4d6e0804
commit 3d056c3125
25 changed files with 91 additions and 58 deletions

View file

@ -1329,7 +1329,7 @@ impl<'tcx> Visitor<'tcx> for TypePrivacyVisitor<'tcx> {
hir::QPath::Resolved(_, path) => Some(self.tcx.def_path_str(path.res.def_id())),
hir::QPath::TypeRelative(_, segment) => Some(segment.ident.to_string()),
};
let kind = kind.descr(def_id);
let kind = self.tcx.def_descr(def_id);
let sess = self.tcx.sess;
let _ = match name {
Some(name) => {