Skip to content

Commit

Permalink
rustdoc: Link associated items in search index to trait
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ulrik Sverdrup committed May 8, 2015
1 parent 6cd7486 commit ff4e061
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/librustdoc/html/render.rs
Expand Up @@ -905,6 +905,8 @@ impl DocFolder for Cache {
// Index this method for searching later on
if let Some(ref s) = item.name {
let (parent, is_method) = match item.inner {
clean::AssociatedTypeItem(..) |
clean::AssociatedConstItem(..) |
clean::TyMethodItem(..) |
clean::StructFieldItem(..) |
clean::VariantItem(..) => {
Expand Down
3 changes: 2 additions & 1 deletion src/librustdoc/html/static/main.js
Expand Up @@ -34,7 +34,8 @@
"macro",
"primitive",
"associatedtype",
"constant"];
"constant",
"associatedconstant"];

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

Expand Down

0 comments on commit ff4e061

Please sign in to comment.