auto merge of #14640 : tomjakubowski/rust/fix-14636, r=huonw

Previously, documentation for an inlined trait (i.e. a trait imported
and reexported from another crate) didn't display the trait's supertraits.

Closes #14636
This commit is contained in:
bors 2014-06-05 03:36:52 -07:00
commit f2821f2c29
1 changed files with 9 additions and 1 deletions

View File

@ -147,10 +147,18 @@ pub fn build_external_trait(tcx: &ty::ctxt, did: ast::DefId) -> clean::Trait {
clean::Required(meth)
}
});
let supertraits = ty::trait_supertraits(tcx, did);
let mut parents = supertraits.iter().map(|i| {
match i.clean() {
clean::TraitBound(ty) => ty,
clean::RegionBound => unreachable!()
}
});
clean::Trait {
generics: def.generics.clean(),
methods: methods.collect(),
parents: Vec::new(), // FIXME: this is likely wrong
parents: parents.collect()
}
}