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 documentation for write! on std::fmt page #36937

Merged
merged 1 commit into from
Oct 8, 2016

Conversation

wesleywiser
Copy link
Member

Fixes #36906

@@ -261,7 +261,8 @@
//! This and `writeln` are two macros which are used to emit the format string
//! to a specified stream. This is used to prevent intermediate allocations of
//! format strings and instead directly write the output. Under the hood, this
//! function is actually invoking the `write` function defined in this module.
//! function is actually invoking the `write_fmt` function defined on the
//! `std::io::Write` trait.
Copy link
Member

Choose a reason for hiding this comment

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

While you're at it. Can you add urls for write_fmt and std::io::Write please?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure! Can you check the urls? I'm not sure I added them correctly

Copy link
Member

Choose a reason for hiding this comment

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

Travis will tell us.

@frewsxcv
Copy link
Member

frewsxcv commented Oct 3, 2016

tidy check stage0 (x86_64-unknown-linux-gnu)
/build/src/libcollections/fmt.rs:264: trailing whitespace

@wesleywiser
Copy link
Member Author

Fixed, thanks!

@@ -261,7 +261,9 @@
//! This and `writeln` are two macros which are used to emit the format string
//! to a specified stream. This is used to prevent intermediate allocations of
//! format strings and instead directly write the output. Under the hood, this
//! function is actually invoking the `write` function defined in this module.
//! function is actually invoking the
//! [`write_fmt`](../../io/trait.Write.html#method.write_fmt) function defined on the
Copy link
Member Author

Choose a reason for hiding this comment

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

It looks like the paths are wrong. I've tried ../io/trait.Write.html and ../../io/trait.Write.html but neither seem to work. @GuillaumeGomez any ideas?

Copy link
Member

Choose a reason for hiding this comment

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

The better thing to test is to build docs and then check by hand:

make docs

Then open doc/index.html with any web browser, go to the modified url and click on it. Then just compare with "real" url and you'll figure out easily.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the tip! When I try that, the links work correctly on my local computer but they still fail on Travis. Should I just remove them for now?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I'll take care of them. Once removed, please squash your commits.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Thank you!

@wesleywiser wesleywiser force-pushed the patch-3 branch 2 times, most recently from 2407070 to 3694a4f Compare October 6, 2016 01:26
@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Oct 7, 2016

@bors: r=frewsxcv rollup

@bors
Copy link
Contributor

bors commented Oct 7, 2016

📌 Commit bbd0040 has been approved by frewsxcv

Manishearth added a commit to Manishearth/rust that referenced this pull request Oct 8, 2016
Fix documentation for `write!` on `std::fmt` page

Fixes rust-lang#36906
bors added a commit that referenced this pull request Oct 8, 2016
Rollup of 6 pull requests

- Successful merges: #36937, #37016, #37028, #37029, #37031, #37034
- Failed merges: #37027
@bors bors merged commit bbd0040 into rust-lang:master Oct 8, 2016
@wesleywiser wesleywiser deleted the patch-3 branch October 8, 2016 17:13
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