File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1141,7 +1141,18 @@ impl ops::DerefMut for String {
1141
1141
}
1142
1142
}
1143
1143
1144
- /// Error returned from `String::from`
1144
+ /// An error when parsing a `String`.
1145
+ ///
1146
+ /// This `enum` is slightly awkward: it will never actually exist. This error is
1147
+ /// part of the type signature of the implementation of [`FromStr`] on
1148
+ /// [`String`]. The return type of [`from_str()`], requires that an error be
1149
+ /// defined, but, given that a [`String`] can always be made into a new
1150
+ /// [`String`] without error, this type will never actually be returned. As
1151
+ /// such, it is only here to satisfy said signature, and is useless otherwise.
1152
+ ///
1153
+ /// [`FromStr`]: ../str/trait.FromStr.html
1154
+ /// [`String`]: struct.String.html
1155
+ /// [`from_str()`]: ../str/trait.FromStr.html#tymethod.from_str
1145
1156
#[ stable( feature = "str_parse_error" , since = "1.5.0" ) ]
1146
1157
#[ derive( Copy ) ]
1147
1158
pub enum ParseError { }
You can’t perform that action at this time.
0 commit comments