Fix inherent-associated-const search result links

Normal constants have their own page while associated constants are
embedded within their parent-items page.
This commit is contained in:
mitaa 2016-02-12 09:34:00 +01:00
parent b9732ed147
commit a085e3bd45

View File

@ -1281,10 +1281,8 @@ impl Clean<Item> for hir::ImplItem {
fn clean(&self, cx: &DocContext) -> Item {
let inner = match self.node {
hir::ImplItemKind::Const(ref ty, ref expr) => {
ConstantItem(Constant{
type_: ty.clean(cx),
expr: expr.span.to_src(cx),
})
AssociatedConstItem(ty.clean(cx),
Some(expr.span.to_src(cx)))
}
hir::ImplItemKind::Method(ref sig, _) => {
MethodItem(sig.clean(cx))