Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Options are Iterators
  • Loading branch information
yotamofek committed Jun 19, 2025
commit 2bf66e3887f8ef915a1f92496b1ddf27d847b1ee
15 changes: 4 additions & 11 deletions src/librustdoc/html/render/write_shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -866,9 +866,8 @@ impl<'item> DocVisitor<'item> for TypeImplCollector<'_, '_, 'item> {
let impl_ = cache
.impls
.get(&target_did)
.map(|v| &v[..])
.unwrap_or_default()
.iter()
.into_iter()
.flatten()
.map(|impl_| {
(impl_.impl_item.item_id, AliasedTypeImpl { impl_, type_aliases: Vec::new() })
})
Expand All @@ -883,14 +882,8 @@ impl<'item> DocVisitor<'item> for TypeImplCollector<'_, '_, 'item> {
// Exclude impls that are directly on this type. They're already in the HTML.
// Some inlining scenarios can cause there to be two versions of the same
// impl: one on the type alias and one on the underlying target type.
let mut seen_impls: FxHashSet<ItemId> = cache
.impls
.get(&self_did)
.map(|s| &s[..])
.unwrap_or_default()
.iter()
.map(|i| i.impl_item.item_id)
.collect();
let mut seen_impls: FxHashSet<ItemId> =
cache.impls.get(&self_did).into_iter().flatten().map(|i| i.impl_item.item_id).collect();
for (impl_item_id, aliased_type_impl) in &mut aliased_type.impl_ {
// Only include this impl if it actually unifies with this alias.
// Synthetic impls are not included; those are also included in the HTML.
Expand Down
Loading