File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 27
27
//! will then parse the format string and determine if the list of arguments
28
28
//! provided is suitable to pass to this format string.
29
29
//!
30
+ //! To convert a single value to a string, use the [`to_string`] method. This
31
+ //! will use the [`Display`] formatting trait.
32
+ //!
30
33
//! ## Positional parameters
31
34
//!
32
35
//! Each formatting argument is allowed to specify which value argument it's
487
490
//! [`write!`]: ../../std/macro.write.html
488
491
//! [`Debug`]: trait.Debug.html
489
492
//! [`format!`]: ../../std/macro.format.html
493
+ //! [`to_string`]: ../../std/string/trait.ToString.html
490
494
//! [`writeln!`]: ../../std/macro.writeln.html
491
495
//! [`write_fmt`]: ../../std/io/trait.Write.html#method.write_fmt
492
496
//! [`std::io::Write`]: ../../std/io/trait.Write.html
Original file line number Diff line number Diff line change @@ -73,9 +73,14 @@ macro_rules! vec {
73
73
/// The same convention is used with [`print!`] and [`write!`] macros,
74
74
/// depending on the intended destination of the string.
75
75
///
76
+ /// To convert a single value to a string, use the [`to_string`] method. This
77
+ /// will use the [`Display`] formatting trait.
78
+ ///
76
79
/// [fmt]: ../std/fmt/index.html
77
80
/// [`print!`]: ../std/macro.print.html
78
81
/// [`write!`]: ../std/macro.write.html
82
+ /// [`to_string`]: ../std/string/trait.ToString.html
83
+ /// [`Display`]: ../std/fmt/trait.Display.html
79
84
///
80
85
/// # Panics
81
86
///
You can’t perform that action at this time.
0 commit comments