File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 2727//! will then parse the format string and determine if the list of arguments
2828//! provided is suitable to pass to this format string.
2929//!
30+ //! To convert a single value to a string, use the [`to_string`] method. This
31+ //! will use the [`Display`] formatting trait.
32+ //!
3033//! ## Positional parameters
3134//!
3235//! Each formatting argument is allowed to specify which value argument it's
487490//! [`write!`]: ../../std/macro.write.html
488491//! [`Debug`]: trait.Debug.html
489492//! [`format!`]: ../../std/macro.format.html
493+ //! [`to_string`]: ../../std/string/trait.ToString.html
490494//! [`writeln!`]: ../../std/macro.writeln.html
491495//! [`write_fmt`]: ../../std/io/trait.Write.html#method.write_fmt
492496//! [`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 {
7373/// The same convention is used with [`print!`] and [`write!`] macros,
7474/// depending on the intended destination of the string.
7575///
76+ /// To convert a single value to a string, use the [`to_string`] method. This
77+ /// will use the [`Display`] formatting trait.
78+ ///
7679/// [fmt]: ../std/fmt/index.html
7780/// [`print!`]: ../std/macro.print.html
7881/// [`write!`]: ../std/macro.write.html
82+ /// [`to_string`]: ../std/string/trait.ToString.html
83+ /// [`Display`]: ../std/fmt/trait.Display.html
7984///
8085/// # Panics
8186///
You can’t perform that action at this time.
0 commit comments