@@ -2031,19 +2031,23 @@ impl ops::DerefMut for String {
20312031
20322032/// An error when parsing a `String`.
20332033///
2034+ /// As of Rust 1.26, this is a type alias for [`!`]. Code that doesn't need to
2035+ /// support compilation with older compiler versions should just use that type
2036+ /// directly; this alias will be deprecated in the future.
2037+ ///
20342038/// This `enum` is slightly awkward: it will never actually exist. This error is
20352039/// part of the type signature of the implementation of [`FromStr`] on
20362040/// [`String`]. The return type of [`from_str`], requires that an error be
20372041/// defined, but, given that a [`String`] can always be made into a new
20382042/// [`String`] without error, this type will never actually be returned. As
20392043/// such, it is only here to satisfy said signature, and is useless otherwise.
20402044///
2045+ /// [`!`]: ../../std/primitive.never.html
20412046/// [`FromStr`]: ../../std/str/trait.FromStr.html
20422047/// [`String`]: struct.String.html
20432048/// [`from_str`]: ../../std/str/trait.FromStr.html#tymethod.from_str
20442049#[ stable( feature = "str_parse_error" , since = "1.5.0" ) ]
2045- #[ derive( Copy ) ]
2046- pub enum ParseError { }
2050+ pub type ParseError = !;
20472051
20482052#[ stable( feature = "rust1" , since = "1.0.0" ) ]
20492053impl FromStr for String {
@@ -2054,37 +2058,6 @@ impl FromStr for String {
20542058 }
20552059}
20562060
2057- #[ stable( feature = "str_parse_error" , since = "1.5.0" ) ]
2058- impl Clone for ParseError {
2059- fn clone ( & self ) -> ParseError {
2060- match * self { }
2061- }
2062- }
2063-
2064- #[ stable( feature = "str_parse_error" , since = "1.5.0" ) ]
2065- impl fmt:: Debug for ParseError {
2066- fn fmt ( & self , _: & mut fmt:: Formatter ) -> fmt:: Result {
2067- match * self { }
2068- }
2069- }
2070-
2071- #[ stable( feature = "str_parse_error2" , since = "1.8.0" ) ]
2072- impl fmt:: Display for ParseError {
2073- fn fmt ( & self , _: & mut fmt:: Formatter ) -> fmt:: Result {
2074- match * self { }
2075- }
2076- }
2077-
2078- #[ stable( feature = "str_parse_error" , since = "1.5.0" ) ]
2079- impl PartialEq for ParseError {
2080- fn eq ( & self , _: & ParseError ) -> bool {
2081- match * self { }
2082- }
2083- }
2084-
2085- #[ stable( feature = "str_parse_error" , since = "1.5.0" ) ]
2086- impl Eq for ParseError { }
2087-
20882061/// A trait for converting a value to a `String`.
20892062///
20902063/// This trait is automatically implemented for any type which implements the
0 commit comments