1
Fork 0

Only walk local items instead of filtering for them later

This commit is contained in:
Oli Scherer 2025-04-01 10:06:27 +00:00
parent 798987982c
commit 49c74d29fd
2 changed files with 18 additions and 22 deletions

View file

@ -421,10 +421,8 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
}
hir::ItemKind::ForeignMod { .. } => {}
hir::ItemKind::Trait(..) => {
for impl_def_id in self.tcx.all_impls(item.owner_id.to_def_id()) {
if let Some(local_def_id) = impl_def_id.as_local()
&& let ItemKind::Impl(impl_ref) =
self.tcx.hir_expect_item(local_def_id).kind
for &impl_def_id in self.tcx.local_trait_impls(item.owner_id.def_id) {
if let ItemKind::Impl(impl_ref) = self.tcx.hir_expect_item(impl_def_id).kind
{
// skip items
// mark dependent traits live