diff options
| author | Ulrik Sverdrup <root@localhost> | 2015-05-09 00:03:42 +0200 |
|---|---|---|
| committer | Ulrik Sverdrup <root@localhost> | 2015-05-09 00:03:42 +0200 |
| commit | ff4e06104903c8cb03600739fa51afb905188b18 (patch) | |
| tree | 02e2ab43fc5bb164dd4fd3e1f45d77f3e6e75afc | |
| parent | 6cd748611346dec3181f81ca3aa551cce0529343 (diff) | |
| download | rust-ff4e06104903c8cb03600739fa51afb905188b18.tar.gz rust-ff4e06104903c8cb03600739fa51afb905188b18.zip | |
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.
| -rw-r--r-- | src/librustdoc/html/render.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/html/static/main.js | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 5a828e8376e..4074a659442 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -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(..) => { diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index c2a59278a86..02c6c8dca9d 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -34,7 +34,8 @@ "macro", "primitive", "associatedtype", - "constant"]; + "constant", + "associatedconstant"]; $('.js-only').removeClass('js-only'); |
