diagnostics: if AssocFn has self argument, describe as method
Discussed in https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.22associated.20function.22.20vs.20.22method.22/near/329265515 This commit also changes the tooltips on rustdoc intra-doc links targeting methods.
This commit is contained in:
@@ -439,7 +439,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
|
||||
|
||||
fn create_error_message(&self) -> String {
|
||||
let def_path = self.tcx.def_path_str(self.def_id);
|
||||
let def_kind = self.tcx.def_kind(self.def_id).descr(self.def_id);
|
||||
let def_kind = self.tcx.def_descr(self.def_id);
|
||||
let (quantifier, bound) = self.get_quantifier_and_bound();
|
||||
let kind = self.kind();
|
||||
let provided_lt_args = self.num_provided_lifetime_args();
|
||||
@@ -990,7 +990,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
|
||||
};
|
||||
|
||||
let msg = {
|
||||
let def_kind = self.tcx.def_kind(self.def_id).descr(self.def_id);
|
||||
let def_kind = self.tcx.def_descr(self.def_id);
|
||||
let (quantifier, bound) = self.get_quantifier_and_bound();
|
||||
|
||||
let params = if bound == 0 {
|
||||
|
||||
Reference in New Issue
Block a user