Skip to content

Commit

Permalink
rustdoc: Remove Sized bounds when cleaning foreign impl Trait
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Mar 27, 2018
1 parent ac655d2 commit 32446f8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/librustdoc/clean/mod.rs
Expand Up @@ -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();
Expand Down

0 comments on commit 32446f8

Please sign in to comment.