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 @@ -937,8 +937,13 @@ pub use macros::Debug;
937
937
/// It may omit internal state, precision, or other information the type does not consider important
938
938
/// for user-facing output, as determined by the type. As such, the output of `Display` might not be
939
939
/// possible to parse, and even if it is, the result of parsing might not exactly match the original
940
- /// value. Calling `.parse()` on the output from `Display` is usually a mistake, unless the type has
941
- /// provided and documented additional guarantees about its `Display` and `FromStr` implementations.
940
+ /// value.
941
+ ///
942
+ /// However, if a type has a lossless `Display` implementation whose output is meant to be
943
+ /// conveniently machine-parseable and not just meant for human consumption, then the type may wish
944
+ /// to accept the same format in `FromStr`, and document that usage. Having both `Display` and
945
+ /// `FromStr` implementations where the result of `Display` cannot be parsed with `FromStr` may
946
+ /// surprise users.
942
947
///
943
948
/// # Internationalization
944
949
///
You can’t perform that action at this time.
0 commit comments