Skip to content

Rustdoc search index missing some re-exported methods #20246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tomjakubowski opened this issue Dec 26, 2014 · 0 comments · Fixed by #34752
Closed

Rustdoc search index missing some re-exported methods #20246

tomjakubowski opened this issue Dec 26, 2014 · 0 comments · Fixed by #34752
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@tomjakubowski
Copy link
Contributor

For example, a search for String::from_str in the std docs only shows three (duplicate) results from the collections crate, even though from_str is also exported by std::string::String.

I suspect that re-exported "static" methods are not included in the search index. For example, search for ::new in the std docs and marvel at how few results appear in the std crate while their "home" crate implementations do appear.

@Gankra Gankra added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jan 8, 2015
bors added a commit that referenced this issue Jul 13, 2016
rustdoc: Fix methods in seach results

Currently methods from extern crates are sometimes added to the search
index when they shouldn't be or added with the original path rather than
the reexported path. This fixes that by making sure `cache().paths` only
contains local paths like the description for it states. It also fixes a
few minor issues with link rendering and redirect generation which would
point to local crate docs even if the docs for that crate hadn't been
generated.

Also a bug with methods implemented on traits which caused wrong paths and
so dead links in the search results has been fixed.

For example:
[before](https://doc.rust-lang.org/nightly/std/?search=is_disjoint) [after](https://ollie27.github.io/rust_doc_test/std/?search=is_disjoint)
[before](https://doc.rust-lang.org/nightly/std/?search=map_or) [after](https://ollie27.github.io/rust_doc_test/std/?search=map_or)
[before](https://doc.rust-lang.org/nightly/std/?search=unsafecell%3A%3Anew) [after](https://ollie27.github.io/rust_doc_test/std/?search=unsafecell%3A%3Anew)
[before](https://doc.rust-lang.org/nightly/std/?search=rng%3A%3Agen_) [after](https://ollie27.github.io/rust_doc_test/std/?search=rng%3A%3Agen_)
[before](https://doc.rust-lang.org/nightly/std/?search=downcast_ref) [after](https://ollie27.github.io/rust_doc_test/std/?search=downcast_ref)

Fixes #20246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants