File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -934,8 +934,13 @@ pub use macros::Debug;
934934/// It may omit internal state, precision, or other information the type does not consider important
935935/// for user-facing output, as determined by the type. As such, the output of `Display` might not be
936936/// possible to parse, and even if it is, the result of parsing might not exactly match the original
937- /// value. Calling `.parse()` on the output from `Display` is usually a mistake, unless the type has
938- /// provided and documented additional guarantees about its `Display` and `FromStr` implementations.
937+ /// value.
938+ ///
939+ /// However, if a type has a lossless `Display` implementation whose output is meant to be
940+ /// conveniently machine-parseable and not just meant for human consumption, then the type may wish
941+ /// to accept the same format in `FromStr`, and document that usage. Having both `Display` and
942+ /// `FromStr` implementations where the result of `Display` cannot be parsed with `FromStr` may
943+ /// surprise users.
939944///
940945/// # Internationalization
941946///
You can’t perform that action at this time.
0 commit comments