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 module links in std::fmt and the Rust book's documentation chapter. #28754

Merged
merged 2 commits into from
Sep 30, 2015

Conversation

luser
Copy link
Contributor

@luser luser commented Sep 30, 2015

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

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).
@rust-highfive
Copy link
Collaborator

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.

@luser
Copy link
Contributor Author

luser commented Sep 30, 2015

FYI I grepped for other instances of this pattern and spot-checked the rest and they were all correct:

find . \( -name "*.rs" -o -name "*.md" \) -print0 | xargs -0 egrep "module[- ]level documentation"

@@ -298,7 +298,7 @@ impl<'a> Display for Arguments<'a> {
///
/// For more information on formatters, see [the module-level documentation][module].
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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).

@Manishearth
Copy link
Member

r+ with that fix

@Manishearth
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Sep 30, 2015

📌 Commit 49fa11c has been approved by Manishearth

@Manishearth
Copy link
Member

@bors rollup

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Sep 30, 2015
…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
@steveklabnik
Copy link
Member

Thanks so much for this!

bors added a commit that referenced this pull request Sep 30, 2015
@bors bors merged commit 49fa11c into rust-lang:master Sep 30, 2015
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.

5 participants