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:
parent
b9732ed147
commit
a085e3bd45
1 changed files with 2 additions and 4 deletions
|
@ -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))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue