move item query inside if stmt

This commit is contained in:
Miguel Guarniz 2022-04-09 13:52:33 -04:00
parent e2512f70ce
commit 1c9ddd2e3e

View File

@ -1170,7 +1170,7 @@ fn process_item(&mut self, id: hir::ItemId) {
}
}
}
_ => {}
_ => bug!(),
}
}
DefKind::GlobalAsm => {
@ -1197,8 +1197,8 @@ fn process_item(&mut self, id: hir::ItemId) {
}
}
DefKind::Impl => {
let item = self.tcx.hir().item(id);
if self.mode == MonoItemCollectionMode::Eager {
let item = self.tcx.hir().item(id);
create_mono_items_for_default_impls(self.tcx, item, self.output);
}
}