-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 module links in std::fmt and the Rust book's documentation chapter. #28754
Conversation
The links in the rustdoc for several places in fmt were trying to link to the std::fmt module but actually linking to std, which was confusing. While trying to figure out why I noticed that the documentation chapter of the Rust book has examples that show this same bug (although it doesn't seem widespread in practice).
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. 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. |
FYI I grepped for other instances of this pattern and spot-checked the rest and they were all correct:
|
@@ -298,7 +298,7 @@ impl<'a> Display for Arguments<'a> { | |||
/// | |||
/// For more information on formatters, see [the module-level documentation][module]. |
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.
We actually don't have any info here either. http://doc.rust-lang.org/nightly/core/fmt/index.html
Should link to ../../std/fmt/index.html
, perhaps?
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.
Ah, I was looking at http://doc.rust-lang.org/nightly/std/fmt/trait.Display.html, which with my patch winds up linking to http://doc.rust-lang.org/nightly/std/fmt/index.html. I didn't realize the docs would wind up in two places.
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.
Yeah, libstd
is mostly reexports of other, possibly unstable crates (collections, core, alloc).
r+ with that fix |
@bors r+ Thanks! |
📌 Commit 49fa11c has been approved by |
@bors rollup |
…anishearth The links in the rustdoc for several places in fmt were trying to link to the std::fmt module but actually linking to std, which was confusing. While trying to figure out why I noticed that the documentation chapter of the Rust book has examples that show this same bug (although it doesn't seem widespread in practice). r? @steveklabnik
Thanks so much for this! |
The links in the rustdoc for several places in fmt were trying to link to
the std::fmt module but actually linking to std, which was confusing.
While trying to figure out why I noticed that the documentation chapter of
the Rust book has examples that show this same bug (although it doesn't seem
widespread in practice).
r? @steveklabnik