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

Remove incorrect information in Arguments docs. #16187

Merged
merged 1 commit into from
Aug 5, 2014

Conversation

steveklabnik
Copy link
Member

Fixes #15830.

@alexcrichton
Copy link
Member

The documentation deleted here all seems still up-to-date to me, it may need an example for clarification but it's true that the only way to safely create Arguments is to use format_args!

@@ -125,11 +125,6 @@ impl<'a> Arguments<'a> {
/// and its arguments. This cannot be generated at runtime because it cannot
/// safely be done so, so no constructors are given and the fields are private
/// to prevent modification.
///
/// The `format_args!` macro will safely create an instance of this structure
/// and pass it to a user-supplied function. The macro validates the format
Copy link
Member

Choose a reason for hiding this comment

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

This paragraph is fine, please reinstate it (I think you could revise it to say, e.g., "and pass it to a function or closures supplied as the first argument").

@steveklabnik
Copy link
Member Author

Ah, I misunderstood what the beef was. What about now?

/// string at compile-time so usage of the `write` and `format` functions can
/// be safely performed.
/// and pass it to a function or closure, passed as the first argument. The
/// macro validates the forma string at compile-time so usage of the `write`
Copy link
Member

Choose a reason for hiding this comment

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

forma string

@alexcrichton
Copy link
Member

Looks good to me!

@steveklabnik
Copy link
Member Author

Fixed the typo.

bors added a commit that referenced this pull request Aug 5, 2014
@bors bors closed this Aug 5, 2014
@bors bors merged commit acf66b1 into rust-lang:master Aug 5, 2014
@steveklabnik steveklabnik deleted the gh15830 branch October 25, 2017 18:26
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.

Documentation: write_fmt is unclear
4 participants