Move two methods from AssocKind to AssocItem.

Because all the other similar methods are on `AssocItem`.
This commit is contained in:
Nicholas Nethercote 2025-04-14 15:39:47 +10:00
parent b26f3d4347
commit 89e93a51c8
9 changed files with 26 additions and 29 deletions

View file

@ -2116,7 +2116,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
err.note(format!(
"{}s cannot be accessed directly on a `trait`, they can only be \
accessed through a specific `impl`",
self.tcx.def_kind_descr(assoc_item.kind.as_def_kind(), item_def_id)
self.tcx.def_kind_descr(assoc_item.as_def_kind(), item_def_id)
));
err.span_suggestion(
span,