Rollup merge of #42271 - tinaun:charfromstr, r=alexcrichton

add `FromStr` Impl for `char`

fixes #24939.

is it possible to use pub(restricted) instead of using a stability attribute for the internal error representation? is it needed at all?
This commit is contained in:
Corey Farwell
2017-06-20 16:28:25 -04:00
committed by GitHub
6 changed files with 85 additions and 1 deletions

View File

@@ -340,6 +340,14 @@ impl Error for char::CharTryFromError {
}
}
#[stable(feature = "char_from_str", since = "1.19.0")]
impl Error for char::ParseCharError {
fn description(&self) -> &str {
self.__description()
}
}
// copied from any.rs
impl Error + 'static {
/// Returns true if the boxed type is the same as `T`