File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -709,12 +709,19 @@ pub use macros::Debug;
709
709
710
710
/// Format trait for an empty format, `{}`.
711
711
///
712
+ /// Implementing this trait for a type will automatically implement the
713
+ /// [`ToString`][tostring] trait for the type, allowing the usage
714
+ /// of the [`.to_string()`][tostring_function] method. Prefer implementing
715
+ /// the `Display` trait for a type, rather than [`ToString`][tostring].
716
+ ///
712
717
/// `Display` is similar to [`Debug`], but `Display` is for user-facing
713
718
/// output, and so cannot be derived.
714
719
///
715
720
/// For more information on formatters, see [the module-level documentation][module].
716
721
///
717
722
/// [module]: ../../std/fmt/index.html
723
+ /// [tostring]: ../../std/string/trait.ToString.html
724
+ /// [tostring_function]: ../../std/string/trait.ToString.html#tymethod.to_string
718
725
///
719
726
/// # Examples
720
727
///
You can’t perform that action at this time.
0 commit comments