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

Fix a few links in the docs #37316

Merged
merged 1 commit into from
Nov 2, 2016
Merged

Fix a few links in the docs #37316

merged 1 commit into from
Nov 2, 2016

Conversation

ollie27
Copy link
Member

@ollie27 ollie27 commented Oct 20, 2016

@@ -241,8 +241,8 @@ pub trait Unsize<T: ?Sized> {
/// compile-time error. Specifically, with structs you'll get [E0204] and with enums you'll get
/// [E0205].
///
/// [E0204]: https://doc.rust-lang.org/error-index.html#E0204
/// [E0205]: https://doc.rust-lang.org/error-index.html#E0205
/// [E0204]: ../../error-index.html#E0204
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is a good idea. If you build docs locally, you'' have troubles.

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you mean? The error index is part of the local docs so this is no different to linking to the book like this.

Copy link
Member

Choose a reason for hiding this comment

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

If you run make docs (or any equivalent) then yes, but what if you just build libstd docs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well then these links won't work and neither will links to the book like on std::sync::Arc and std::borrow::Borrow for example. I don't consider that a problem because if you want to build the std docs without any dead links you need to use make docs anyway. The advantages of using relative links like this are: they work offline, they link to the same version of the docs you're already viewing and linkchecker can check them.

Copy link
Member

Choose a reason for hiding this comment

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

Hum, I see your point. I guess it's okay then.

/// used to call the argument's `Drop` implementation.
///
/// [0040]: https://doc.rust-lang.org/error-index.html#E0040
/// [`std::mem::drop`]: https://doc.rust-lang.org/std/mem/fn.drop.html
/// [E0040]: ../../error-index.html#E0040
Copy link
Member

Choose a reason for hiding this comment

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

Same comment.

@@ -914,6 +914,7 @@ impl<'a> cmp::Ord for Components<'a> {
/// [`Path`]: struct.Path.html
/// [`push`]: struct.PathBuf.html#method.push
/// [`set_extension`]: struct.PathBuf.html#method.set_extension
/// [`Deref`]: ../ops/trait.Deref.html
Copy link
Member

Choose a reason for hiding this comment

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

Nice catch!

@GuillaumeGomez
Copy link
Member

Thanks for your PR. Just a few things to fix and it should be good!

@GuillaumeGomez
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Oct 31, 2016

📌 Commit 8faa503 has been approved by GuillaumeGomez

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 1, 2016
bors added a commit that referenced this pull request Nov 2, 2016
Rollup of 7 pull requests

- Successful merges: #36849, #37059, #37296, #37316, #37484, #37485, #37495
- Failed merges:
@bors bors merged commit 8faa503 into rust-lang:master Nov 2, 2016
@ollie27 ollie27 deleted the docs_links branch November 2, 2016 17:26
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