Skip to content

Commit ff4e061

Browse files
author
Ulrik Sverdrup
committed
rustdoc: Link associated items in search index to trait
This is related to isssue #22442 and solves it partly. This solves the links of associated types and constants, so that they link to the trait page.
1 parent 6cd7486 commit ff4e061

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/librustdoc/html/render.rs

+2
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,8 @@ impl DocFolder for Cache {
905905
// Index this method for searching later on
906906
if let Some(ref s) = item.name {
907907
let (parent, is_method) = match item.inner {
908+
clean::AssociatedTypeItem(..) |
909+
clean::AssociatedConstItem(..) |
908910
clean::TyMethodItem(..) |
909911
clean::StructFieldItem(..) |
910912
clean::VariantItem(..) => {

src/librustdoc/html/static/main.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"macro",
3535
"primitive",
3636
"associatedtype",
37-
"constant"];
37+
"constant",
38+
"associatedconstant"];
3839

3940
$('.js-only').removeClass('js-only');
4041

0 commit comments

Comments
 (0)