File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1692,6 +1692,13 @@ impl fmt::Debug for ParseError {
16921692 }
16931693}
16941694
1695+ #[ stable( feature = "str_parse_error2" , since = "1.8.0" ) ]
1696+ impl fmt:: Display for ParseError {
1697+ fn fmt ( & self , _: & mut fmt:: Formatter ) -> fmt:: Result {
1698+ match * self { }
1699+ }
1700+ }
1701+
16951702#[ stable( feature = "str_parse_error" , since = "1.5.0" ) ]
16961703impl PartialEq for ParseError {
16971704 fn eq ( & self , _: & ParseError ) -> bool {
Original file line number Diff line number Diff line change @@ -182,6 +182,13 @@ impl Error for string::FromUtf16Error {
182182 }
183183}
184184
185+ #[ stable( feature = "str_parse_error2" , since = "1.8.0" ) ]
186+ impl Error for string:: ParseError {
187+ fn description ( & self ) -> & str {
188+ "parse error"
189+ }
190+ }
191+
185192// copied from any.rs
186193impl Error + ' static {
187194 /// Returns true if the boxed type is the same as `T`
You can’t perform that action at this time.
0 commit comments