Skip to content

rustdoc: Searching for path (including a ::) does not work #63005

New issue

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

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

Already on GitHub? # to your account

Closed
RalfJung opened this issue Jul 26, 2019 · 4 comments · Fixed by #64094
Closed

rustdoc: Searching for path (including a ::) does not work #63005

RalfJung opened this issue Jul 26, 2019 · 4 comments · Fixed by #64094
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@RalfJung
Copy link
Member

Say I want to find the docs for Vec::new, so I search for that. What I get is this: almost all of these results are entirely irrelevant.

rustdoc search should understand enough about Rust syntax to handle :: appropriately.

@hellow554
Copy link
Contributor

IIRC this used to work at some time :/

@jonas-schievink jonas-schievink added C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 26, 2019
@CryZe
Copy link
Contributor

CryZe commented Jul 26, 2019

Looks like this is a regression in 1.36:
Here it still works: https://doc.rust-lang.org/1.35.0/std/?search=Vec%3A%3Anew
Here it doesn't: https://doc.rust-lang.org/1.36.0/std/?search=Vec%3A%3Anew

@RalfJung
Copy link
Member Author

Well, it works better. It still shows lots of junk even for prior versions.

I mean, when I search for from_raw_parts it also does not show every method that contains the word "from". So searching Vew::new should not show every method called new.

@ayuusweetfish
Copy link
Contributor

Hi!

This regression seems to be introduced in #59622. I have a patch in #64094 and would be grateful if anyone interested helps review it.

Centril added a commit to Centril/rust that referenced this issue Sep 5, 2019
…umeGomez

Improve searching in rustdoc and add tests

👋 I have made searching in rustdoc more intuitive, added a couple more tests and made a little shell script to aid testing. Closes rust-lang#63005.

It took me quite a while to figure out how to run the tests for rustdoc (instead of running tests for other crates with rustdoc); the only pointer I found was [hidden in the rustc book](https://rust-lang.github.io/rustc-guide/rustdoc.html#cheat-sheet). Maybe this could be better documented? I shall be delighted to help if it is desirable.
Centril added a commit to Centril/rust that referenced this issue Sep 5, 2019
…umeGomez

Improve searching in rustdoc and add tests

👋 I have made searching in rustdoc more intuitive, added a couple more tests and made a little shell script to aid testing. Closes rust-lang#63005.

It took me quite a while to figure out how to run the tests for rustdoc (instead of running tests for other crates with rustdoc); the only pointer I found was [hidden in the rustc book](https://rust-lang.github.io/rustc-guide/rustdoc.html#cheat-sheet). Maybe this could be better documented? I shall be delighted to help if it is desirable.
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Sep 6, 2019
…umeGomez

Improve searching in rustdoc and add tests

👋 I have made searching in rustdoc more intuitive, added a couple more tests and made a little shell script to aid testing. Closes rust-lang#63005.

It took me quite a while to figure out how to run the tests for rustdoc (instead of running tests for other crates with rustdoc); the only pointer I found was [hidden in the rustc book](https://rust-lang.github.io/rustc-guide/rustdoc.html#cheat-sheet). Maybe this could be better documented? I shall be delighted to help if it is desirable.
@bors bors closed this as completed in ab75a17 Sep 6, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. 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.

5 participants