File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 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 {
11411141 }
11421142}
11431143
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
11451156#[ stable( feature = "str_parse_error" , since = "1.5.0" ) ]
11461157#[ derive( Copy ) ]
11471158pub enum ParseError { }
You can’t perform that action at this time.
0 commit comments