-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Conversation
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 |
There was a problem hiding this comment.
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....
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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` |
There was a problem hiding this comment.
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?
14868df
to
7ec6f84
Compare
7ec6f84
to
ad63215
Compare
@bors: r+ rollup |
📌 Commit ad63215 has been approved by |
…omez Add links between format_args! macro and std::fmt::Arguments struct r? @GuillaumeGomez
r? @GuillaumeGomez