Skip to content

Commit

Permalink
rustdoc: Don't put non rustdoc-reachable impls into all_trait_impls
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Jan 25, 2023
1 parent ca93310 commit 3982258
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/librustdoc/passes/collect_intra_doc_links/early.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ impl<'ra> EarlyDocLinkResolver<'_, 'ra> {
}
self.resolve_doc_links_extern_impl(impl_def_id, false);
}
self.all_trait_impls.push(impl_def_id);
}
for (ty_def_id, impl_def_id) in all_inherent_impls {
if self.is_doc_reachable(ty_def_id) {
Expand All @@ -171,9 +172,6 @@ impl<'ra> EarlyDocLinkResolver<'_, 'ra> {
for impl_def_id in all_incoherent_impls {
self.resolve_doc_links_extern_impl(impl_def_id, true);
}

self.all_trait_impls
.extend(all_trait_impls.into_iter().map(|(_, def_id, _)| def_id));
}

if crates.len() > start_cnum {
Expand Down

0 comments on commit 3982258

Please sign in to comment.