diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-11-30 18:02:22 -0500 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-11-30 18:02:22 -0500 |
| commit | 9437caff5550945030f7fb0289f86eb74b953fb3 (patch) | |
| tree | 6366b71156aae265967bf6ae49b0b64d4d215514 /src | |
| parent | 06419880a8b78a213baf9af15fe30e0f2d4332b1 (diff) | |
| parent | 23fb9743d33b218328699d64e792da877d470674 (diff) | |
Rollup merge of #30120 - steveklabnik:doc_string_parse_error, r=alexcrichton
Part of #29376
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcollections/string.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index 5692d648849..ac24ab42291 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -1141,7 +1141,18 @@ impl ops::DerefMut for String { } } -/// Error returned from `String::from` +/// An error when parsing a `String`. +/// +/// This `enum` is slightly awkward: it will never actually exist. This error is +/// part of the type signature of the implementation of [`FromStr`] on +/// [`String`]. The return type of [`from_str()`], requires that an error be +/// defined, but, given that a [`String`] can always be made into a new +/// [`String`] without error, this type will never actually be returned. As +/// such, it is only here to satisfy said signature, and is useless otherwise. +/// +/// [`FromStr`]: ../str/trait.FromStr.html +/// [`String`]: struct.String.html +/// [`from_str()`]: ../str/trait.FromStr.html#tymethod.from_str #[stable(feature = "str_parse_error", since = "1.5.0")] #[derive(Copy)] pub enum ParseError {} |
