File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -761,6 +761,12 @@ unsafe impl SliceIndex<str> for ops::RangeToInclusive<usize> {
761
761
/// mistake, unless the type has provided and documented additional guarantees about its `Display`
762
762
/// and `FromStr` implementations.
763
763
///
764
+ /// If a type happens to have a lossless `Display` implementation whose output is meant to be
765
+ /// conveniently machine-parseable and not just meant for human consumption, then the type may wish
766
+ /// to accept the same format in `FromStr`, and document that usage. Having both `Display` and
767
+ /// `FromStr` implementations where the result of `Display` cannot be parsed with `FromStr` may
768
+ /// surprise users. (However, the result of such parsing may not have the same value as the input.)
769
+ ///
764
770
/// # Examples
765
771
///
766
772
/// Basic implementation of `FromStr` on an example `Point` type:
You can’t perform that action at this time.
0 commit comments