diff options
| author | Ulrik Sverdrup <root@localhost> | 2015-05-21 14:17:37 +0200 |
|---|---|---|
| committer | Ulrik Sverdrup <root@localhost> | 2015-05-21 14:17:37 +0200 |
| commit | 093e18d18465364ef96495ab662fb4325595bead (patch) | |
| tree | 3ea08b506674a2e625d86089a1391fe24aa4087d /src/test/rustdoc | |
| parent | d7185dcff12a6963535e73ed4b0f392da236068c (diff) | |
rustdoc: Skip types in impls in search index
For a trait *implementation* there are typedefs which are the types for that particular trait and implementor. Skip these in the search index. There were lots of dud items in the search index due to this (search for Item, Iterator's associated type). Add a boolean to clean::TypedefItem so that it tracks whether the it is a type alias on its own, or if it's a `type` item in a trait impl. Fixes #22442
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/search-index.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/rustdoc/search-index.rs b/src/test/rustdoc/search-index.rs index 42469a21f22..70b77f6760d 100644 --- a/src/test/rustdoc/search-index.rs +++ b/src/test/rustdoc/search-index.rs @@ -10,6 +10,8 @@ #![crate_name = "rustdoc_test"] +use std::ops::Deref; + // @has search-index.js Foo pub use private::Foo; @@ -24,3 +26,11 @@ mod private { fn trait_method(&self) {} // @!has - priv_method } } + +pub struct Bar; + +impl Deref for Bar { + // @!has search-index.js Target + type Target = Bar; + fn deref(&self) -> &Bar { self } +} |
