-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Fix a few links in the docs #37316
Conversation
@@ -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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
Thanks for your PR. Just a few things to fix and it should be good! |
@bors: r+ rollup |
📌 Commit 8faa503 has been approved by |
Fix a few links in the docs r? @steveklabnik
r? @steveklabnik