Skip to content
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

Redirect docs.rs/std to the official standard library docs. #398

Merged
merged 2 commits into from
Oct 11, 2019

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Aug 23, 2019

See also #56 and #193.

@m-ou-se
Copy link
Member Author

m-ou-se commented Oct 10, 2019

Is there anything that needs to be done or discussed before this can be merged?

@GuillaumeGomez
Copy link
Member

The problem with this PR is that it doesn't take into account the version of the std used when documenting the crate. Could you update the url to match it like https://doc.rust-lang.org/{version}/std/ please? So for example: https://doc.rust-lang.org/1.29.0/std/.

@m-ou-se
Copy link
Member Author

m-ou-se commented Oct 11, 2019

The problem with this PR is that it doesn't take into account the version of the std used when documenting the crate.

When documenting which crate? I'm not sure I understand your comment. I just want docs.rs/std to redirect to the latest std documentation at doc.rust-lang.org/std, because the first url is easier to remember and type. All generated documentation would still directly link to doc.rust-lang.org/{version}/....

@GuillaumeGomez
Copy link
Member

From what I understand of your code, it doesn't take the version into account. For example, if the item being linked doesn't exist anymore in the current std lib, then you'd end up with a dead link.

@m-ou-se
Copy link
Member Author

m-ou-se commented Oct 11, 2019

Which items? All it does is redirect docs.rs/std to doc.rust-lang.org/std, nothing else. It doesn't link to specific items.

@GuillaumeGomez
Copy link
Member

Oh my bad, I completely misunderstood what your PR was doing... Just one thing then, can you replace the current url with doc.rust-lang.org/stable/std please?

@m-ou-se
Copy link
Member Author

m-ou-se commented Oct 11, 2019

Sure, done!

@GuillaumeGomez
Copy link
Member

Ok, looks all good to me now. I'll let @pietroalbini handle the merge. :)

@pietroalbini pietroalbini merged commit 4419dc8 into rust-lang:master Oct 11, 2019
@pietroalbini
Copy link
Member

The redirect is in place! https://docs.rs/std

@m-ou-se m-ou-se deleted the std-redirect branch October 11, 2019 11:17
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.

3 participants