Auto merge of #96531 - kckeiks:remove-item-like-visitor-from-rustc-typeck, r=cjgillot
Remove ItemLikeVisitor impls from rustc_typeck Issue #95004 cc `@cjgillot`
This commit is contained in:
commit
f6e5570460
23 changed files with 512 additions and 553 deletions
|
@ -1164,7 +1164,7 @@ struct RootCollector<'a, 'tcx> {
|
|||
|
||||
impl<'v> RootCollector<'_, 'v> {
|
||||
fn process_item(&mut self, id: hir::ItemId) {
|
||||
match self.tcx.hir().def_kind(id.def_id) {
|
||||
match self.tcx.def_kind(id.def_id) {
|
||||
DefKind::Enum | DefKind::Struct | DefKind::Union => {
|
||||
let item = self.tcx.hir().item(id);
|
||||
match item.kind {
|
||||
|
@ -1225,7 +1225,7 @@ impl<'v> RootCollector<'_, 'v> {
|
|||
}
|
||||
|
||||
fn process_impl_item(&mut self, id: hir::ImplItemId) {
|
||||
if matches!(self.tcx.hir().def_kind(id.def_id), DefKind::AssocFn) {
|
||||
if matches!(self.tcx.def_kind(id.def_id), DefKind::AssocFn) {
|
||||
self.push_if_root(id.def_id);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue