Auto merge of #36523 - Mark-Simulacrum:format-args-link, r=GuillaumeGomez
Add links between format_args! macro and std::fmt::Arguments struct r? @GuillaumeGomez
This commit is contained in:
commit
bfac5d6d9f
@ -272,10 +272,14 @@ 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`
|
||||
/// and `format` functions can be safely performed.
|
||||
/// 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
|
||||
/// [`format`]: ../../std/fmt/fn.format.html
|
||||
/// [`write`]: ../../std/fmt/fn.write.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Arguments<'a> {
|
||||
|
@ -193,12 +193,18 @@ macro_rules! assert_approx_eq {
|
||||
pub mod builtin {
|
||||
/// The core macro for formatted string creation & output.
|
||||
///
|
||||
/// 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
|
||||
/// 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
|
||||
/// proxied through this one.
|
||||
///
|
||||
/// For more information, see the documentation in `std::fmt`.
|
||||
/// For more information, see the documentation in [`std::fmt`].
|
||||
///
|
||||
/// [`fmt::Arguments`]: ../std/fmt/struct.Arguments.html
|
||||
/// [`std::fmt`]: ../std/fmt/index.html
|
||||
/// [`format!`]: ../std/macro.format.html
|
||||
/// [`write!`]: ../std/macro.write.html
|
||||
/// [`println!`]: ../std/macro.println.html
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user