rustdoc: Remove Sized bounds when cleaning foreign impl Trait

This commit is contained in:
Manish Goregaokar 2018-03-27 20:59:09 +02:00
parent ac655d25c7
commit 32446f8db3

View file

@ -2770,6 +2770,14 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
return None;
};
if let Some(sized) = cx.tcx.lang_items().sized_trait() {
if trait_ref.def_id() == sized {
return None;
}
}
// FIXME(Manishearth) handle cases which aren't Sized
let bounds = bounds.predicates.iter().filter_map(|pred|
if let ty::Predicate::Projection(proj) = *pred {
let proj = proj.skip_binder();