Implement TryFrom<u32> for char
For symmetry with From<char> for u32.
This commit is contained in:
parent
41d0a89e3a
commit
f040208d53
5 changed files with 49 additions and 6 deletions
|
@ -302,6 +302,13 @@ impl<'a, T: ?Sized + Reflect> Error for cell::BorrowMutError<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "try_from", issue = "33417")]
|
||||
impl Error for char::CharTryFromError {
|
||||
fn description(&self) -> &str {
|
||||
"converted integer out of range for `char`"
|
||||
}
|
||||
}
|
||||
|
||||
// copied from any.rs
|
||||
impl Error + 'static {
|
||||
/// Returns true if the boxed type is the same as `T`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue