about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2018-03-27 20:59:09 +0200
committerManish Goregaokar <manishsmail@gmail.com>2018-03-27 23:56:32 +0200
commit32446f8db3586ff8c56b745bc2fbaf4c88bcab71 (patch)
tree1607ba0717bc86f3874f9ab2e9b5e62bea944ed3 /src
parentac655d25c7c1b56fb70b272890b5df1cdd43d236 (diff)
downloadrust-32446f8db3586ff8c56b745bc2fbaf4c88bcab71.tar.gz
rust-32446f8db3586ff8c56b745bc2fbaf4c88bcab71.zip
rustdoc: Remove Sized bounds when cleaning foreign impl Trait
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/clean/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 875ed12718f..aa8a7fc5346 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -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();