Skip to content

primitives (and their methods) don't show up in rustdoc search results #23709

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
TimNN opened this issue Mar 25, 2015 · 3 comments
Closed

primitives (and their methods) don't show up in rustdoc search results #23709

TimNN opened this issue Mar 25, 2015 · 3 comments

Comments

@TimNN
Copy link
Contributor

TimNN commented Mar 25, 2015

I needed a method to replace some text in a string. Searching rustdoc for "replace" did not yield any result. After 5 minutes of looking around I finally found it after using the "[src]" link of the std::str docs and employing Ctrl+F to search the source. Only when I noticed that the method was defined on the primitive str type, did I remember that primitives are documented separately.

I already have experience in navigating rustdoc, but it still took me a considerable amount of time to find what I was looking for. The topic of hard to find documentation on strings was already the subject #22902, which resulted in two tiny links being added to the docs of std::str.

I think at the very least std::str should prominently link to the str primitive, mentioning specifically that additional methods are documented there.

Even better in my opinion would be if primitives and their methods could be found using rustdoc's search, maybe under a pseudo module (ie. primitive::str::replace).

@steveklabnik
Copy link
Member

We have four or five related issues ipen about primitives, and also one about Deref coercions. (That's more of a 👍 than a 'this is invalid', it's certainly a pain point)

@TimNN
Copy link
Contributor Author

TimNN commented Mar 25, 2015

Now I feel stupid, while searching for open issues I filtered using the A-docs label instead of A-rustdoc...

Closing as dupe of #23511.

@TimNN TimNN closed this as completed Mar 25, 2015
@steveklabnik
Copy link
Member

That was a 👍 emoji, yay mobile!

Anyway, cool, wasn't sure if there was something additional here. I really like the intermediate solution of linking to the primitive page from the module page.

I filtered using the A-docs label instead of A-rustdoc...

It's all good. generally, A-docs is docs that need to be written, which is what this looks like at first. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants