Skip to content

Improvements around documentation linkage for core primitive types #31965

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

Merged
merged 1 commit into from Mar 1, 2016
Merged

Improvements around documentation linkage for core primitive types #31965

merged 1 commit into from Mar 1, 2016

Conversation

ghost
Copy link

@ghost ghost commented Feb 29, 2016

Hello.

Quite a few of the links in the core module concerning redirection to additional primitive type documentation are broken. I noticed in #30214 that there seemed to be a consensus with linking across to std module documentation from the core module. This is what I've done with the core modules for primitive types.

If the changes here are good to go forward with, I'll happily tend to adding more documentation links for the extension traits in the aforementioned issue if need be.

r? @steveklabnik

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

//! [`std::char`]: ../../std/char/index.html
//! [`rustc_unicode::char`]: ../../rustc_unicode/char/index.html
//!
//! *[See also the `char` primitive type](../../std/primitive.char.html).*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This documentation is never rendered anywhere, so these links are moot.

@steveklabnik
Copy link
Member

Hey @miqid ! Thanks for this. I was wondering what the right way to do this would be, and this is an interesting approach. Hmm...

So, one weird thing is that the primitive types docs are actually in the primitive_doc submodule of std, but not on the type. So some of these changes are things that were never renered in the first place; I believe it's all of the parts of this patch which didn't have links before, but where you're adding them. So we should leave those ones alone, and focus on fixing the links that do exist. Does that make sense?

@ghost
Copy link
Author

ghost commented Feb 29, 2016

Just to clarify, you want me to back out of any modifications that introduce new links? I can do so. I just felt that it's convenient to provide those links for easy navigation around the API documentation. :-)

Also, with regards to rustc_unicode::char and std::char, both, at least when I build the documentation, have a corresponding documentation page—perhaps this is another problem and they need to be suppressed instead? So I'm not sure by what you mean when you say that they are never rendered anywhere.

@steveklabnik
Copy link
Member

Just to clarify, you want me to back out of any modifications that introduce new links? I can do so. I just felt that it's convenient to provide those links for easy navigation around the API documentation. :-)

Yeah, the issue here though is that these will never end up on a page, so the links end up being distracting without being helpful, at least, in my opinion.

Also, with regards to rustc_unicode::char and std::char,

Yeah, those modules should be, it's the primitive types that aren't.

Redirects existing links for more details on primitive types in the
`core` module to the ones that exist in the `std` module.
@ghost
Copy link
Author

ghost commented Mar 1, 2016

I revised the commit to only include redirection changes for existing links from the core module to the std module. Any thing else I can tend to?

@steveklabnik
Copy link
Member

@bors: r+ rollup

nope, looking great! Thanks so much :)

@bors
Copy link
Collaborator

bors commented Mar 1, 2016

📌 Commit dc97f84 has been approved by steveklabnik

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Mar 1, 2016
Hello.

Quite a few of the links in the `core` module concerning redirection to additional primitive type documentation are broken. I noticed in rust-lang#30214 that there seemed to be a consensus with linking across to `std` module documentation from the `core` module. This is what I've done with the `core` modules for primitive types.

If the changes here are good to go forward with, I'll happily tend to adding more documentation links for the extension traits in the aforementioned issue if need be.

r? @steveklabnik
bors added a commit that referenced this pull request Mar 1, 2016
@bors bors merged commit dc97f84 into rust-lang:master Mar 1, 2016
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

Successfully merging this pull request may close these issues.

4 participants