Skip to content

Commit 32446f8

Browse files
committed
rustdoc: Remove Sized bounds when cleaning foreign impl Trait
1 parent ac655d2 commit 32446f8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,6 +2770,14 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
27702770
return None;
27712771
};
27722772

2773+
if let Some(sized) = cx.tcx.lang_items().sized_trait() {
2774+
if trait_ref.def_id() == sized {
2775+
return None;
2776+
}
2777+
}
2778+
2779+
// FIXME(Manishearth) handle cases which aren't Sized
2780+
27732781
let bounds = bounds.predicates.iter().filter_map(|pred|
27742782
if let ty::Predicate::Projection(proj) = *pred {
27752783
let proj = proj.skip_binder();

0 commit comments

Comments
 (0)