Rollup merge of #53801 - GuillaumeGomez:duplicated-foreign-type-impls, r=QuietMisdreavus
Prevent duplicated impl on foreign types Fixes #53689. r? @QuietMisdreavus
This commit is contained in:
commit
f37081499b
@ -2956,14 +2956,18 @@ fn item_trait(
|
|||||||
</h2>
|
</h2>
|
||||||
")?;
|
")?;
|
||||||
|
|
||||||
|
let mut foreign_cache = FxHashSet();
|
||||||
for implementor in foreign {
|
for implementor in foreign {
|
||||||
|
if foreign_cache.insert(implementor.inner_impl().to_string()) {
|
||||||
let assoc_link = AssocItemLink::GotoSource(
|
let assoc_link = AssocItemLink::GotoSource(
|
||||||
implementor.impl_item.def_id, &implementor.inner_impl().provided_trait_methods
|
implementor.impl_item.def_id,
|
||||||
|
&implementor.inner_impl().provided_trait_methods
|
||||||
);
|
);
|
||||||
render_impl(w, cx, &implementor, assoc_link,
|
render_impl(w, cx, &implementor, assoc_link,
|
||||||
RenderMode::Normal, implementor.impl_item.stable_since(), false)?;
|
RenderMode::Normal, implementor.impl_item.stable_since(), false)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
write!(w, "{}", impl_header)?;
|
write!(w, "{}", impl_header)?;
|
||||||
for implementor in concrete {
|
for implementor in concrete {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user