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

Add links between format_args! macro and std::fmt::Arguments struct #36523

Merged
merged 1 commit into from
Sep 19, 2016

Conversation

Mark-Simulacrum
Copy link
Member

@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 @GuillaumeGomez (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. Due to 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.

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

Choose a reason for hiding this comment

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

Should we link to ../../std/macro.format_args!.html or ../../std/macro.format_args.html? (note the lack of the ! in the second version).

The latter seems to not work, but I might be doing something wrong....

Copy link
Member

Choose a reason for hiding this comment

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

I would say the second.

/// This macro produces a value of type `fmt::Arguments`. This value can be
/// passed to the functions in `std::fmt` for performing useful functions.
/// This macro produces a value of type [`fmt::Arguments`]. This value can be
/// passed to the functions in [`std::fmt`] for performing useful functions.
/// All other formatting macros (`format!`, `write!`, `println!`, etc) are
Copy link
Member

Choose a reason for hiding this comment

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

Why not adding urls for these macros as well?

@@ -272,10 +272,12 @@ impl<'a> Arguments<'a> {
/// 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
/// The [`format_args!`] macro will safely create an instance of this structure
/// and pass it to a function or closure, passed as the first argument. The
/// macro validates the format 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.

Why not adding urls for write and format functions?

@GuillaumeGomez
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Sep 17, 2016

📌 Commit ad63215 has been approved by GuillaumeGomez

@bors
Copy link
Contributor

bors commented Sep 19, 2016

⌛ Testing commit ad63215 with merge bfac5d6...

bors added a commit that referenced this pull request Sep 19, 2016
…omez

Add links between format_args! macro and std::fmt::Arguments struct

r? @GuillaumeGomez
@bors bors merged commit ad63215 into rust-lang:master Sep 19, 2016
@Mark-Simulacrum Mark-Simulacrum deleted the format-args-link branch October 22, 2016 02:12
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