Skip to content

Commit a085e3b

Browse files
committed
Fix inherent-associated-const search result links
Normal constants have their own page while associated constants are embedded within their parent-items page.
1 parent b9732ed commit a085e3b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,10 +1281,8 @@ impl Clean<Item> for hir::ImplItem {
12811281
fn clean(&self, cx: &DocContext) -> Item {
12821282
let inner = match self.node {
12831283
hir::ImplItemKind::Const(ref ty, ref expr) => {
1284-
ConstantItem(Constant{
1285-
type_: ty.clean(cx),
1286-
expr: expr.span.to_src(cx),
1287-
})
1284+
AssociatedConstItem(ty.clean(cx),
1285+
Some(expr.span.to_src(cx)))
12881286
}
12891287
hir::ImplItemKind::Method(ref sig, _) => {
12901288
MethodItem(sig.clean(cx))

0 commit comments

Comments
 (0)