Skip to content

Make mention of alternate flags in std::fmt traits #26850

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

Merged
merged 1 commit into from
Jul 8, 2015

Conversation

steveklabnik
Copy link
Member

@rust-highfive
Copy link
Contributor

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@killercup
Copy link
Member

Thanks!

One of the most awesome parts of this ist that it works for nested structures, too. Do you maybe want to add a more complex example somewhere? (Feel free to copy my test code!)

@steveklabnik
Copy link
Member Author

I don't know, I guess I just assume that it would do so, but maybe assumptions don't matter.

@@ -379,6 +410,8 @@ pub trait Display {
///
/// The `Octal` trait should format its output as a number in base-8.
///
/// The alternate flag, `#o`, adds a `0o` in front of the output.
Copy link
Member

Choose a reason for hiding this comment

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

Hm, isn't just # the alternate flag not the full #o entity? (i.e. one adds the flag to the format specifier o)

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess technically that is true.

@steveklabnik
Copy link
Member Author

@huonw updated!

@alexcrichton
Copy link
Member

@bors: r+ 6c52903 rollup

bors added a commit that referenced this pull request Jul 8, 2015
@bors bors merged commit 6c52903 into rust-lang:master Jul 8, 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.

6 participants