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