@@ -1958,19 +1958,23 @@ impl ops::DerefMut for String {
19581958
19591959/// An error when parsing a `String`.
19601960///
1961+ /// As of Rust 1.26, this is a type alias for [`!`]. Code that doesn't need to
1962+ /// support compilation with older compiler versions should just use that type
1963+ /// directly; this alias will be deprecated in the future.
1964+ ///
19611965/// This `enum` is slightly awkward: it will never actually exist. This error is
19621966/// part of the type signature of the implementation of [`FromStr`] on
19631967/// [`String`]. The return type of [`from_str`], requires that an error be
19641968/// defined, but, given that a [`String`] can always be made into a new
19651969/// [`String`] without error, this type will never actually be returned. As
19661970/// such, it is only here to satisfy said signature, and is useless otherwise.
19671971///
1972+ /// [`!`]: ../../std/primitive.never.html
19681973/// [`FromStr`]: ../../std/str/trait.FromStr.html
19691974/// [`String`]: struct.String.html
19701975/// [`from_str`]: ../../std/str/trait.FromStr.html#tymethod.from_str
19711976#[ stable( feature = "str_parse_error" , since = "1.5.0" ) ]
1972- #[ derive( Copy ) ]
1973- pub enum ParseError { }
1977+ pub type ParseError = !;
19741978
19751979#[ stable( feature = "rust1" , since = "1.0.0" ) ]
19761980impl FromStr for String {
@@ -1981,37 +1985,6 @@ impl FromStr for String {
19811985 }
19821986}
19831987
1984- #[ stable( feature = "str_parse_error" , since = "1.5.0" ) ]
1985- impl Clone for ParseError {
1986- fn clone ( & self ) -> ParseError {
1987- match * self { }
1988- }
1989- }
1990-
1991- #[ stable( feature = "str_parse_error" , since = "1.5.0" ) ]
1992- impl fmt:: Debug for ParseError {
1993- fn fmt ( & self , _: & mut fmt:: Formatter ) -> fmt:: Result {
1994- match * self { }
1995- }
1996- }
1997-
1998- #[ stable( feature = "str_parse_error2" , since = "1.8.0" ) ]
1999- impl fmt:: Display for ParseError {
2000- fn fmt ( & self , _: & mut fmt:: Formatter ) -> fmt:: Result {
2001- match * self { }
2002- }
2003- }
2004-
2005- #[ stable( feature = "str_parse_error" , since = "1.5.0" ) ]
2006- impl PartialEq for ParseError {
2007- fn eq ( & self , _: & ParseError ) -> bool {
2008- match * self { }
2009- }
2010- }
2011-
2012- #[ stable( feature = "str_parse_error" , since = "1.5.0" ) ]
2013- impl Eq for ParseError { }
2014-
20151988/// A trait for converting a value to a `String`.
20161989///
20171990/// This trait is automatically implemented for any type which implements the
0 commit comments