Auto merge of #58302 - SimonSapin:tryfrom, r=alexcrichton
Stabilize TryFrom and TryInto with a convert::Infallible empty enum This is the plan proposed in https://github.com/rust-lang/rust/issues/33417#issuecomment-423073898
This commit is contained in:
commit
00aae71f50
16 changed files with 163 additions and 79 deletions
|
@ -466,14 +466,14 @@ impl Error for num::ParseIntError {
|
|||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "try_from", issue = "33417")]
|
||||
#[stable(feature = "try_from", since = "1.34.0")]
|
||||
impl Error for num::TryFromIntError {
|
||||
fn description(&self) -> &str {
|
||||
self.__description()
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "try_from", issue = "33417")]
|
||||
#[stable(feature = "try_from", since = "1.34.0")]
|
||||
impl Error for array::TryFromSliceError {
|
||||
fn description(&self) -> &str {
|
||||
self.__description()
|
||||
|
@ -548,7 +548,7 @@ impl Error for cell::BorrowMutError {
|
|||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "try_from", issue = "33417")]
|
||||
#[stable(feature = "try_from", since = "1.34.0")]
|
||||
impl Error for char::CharTryFromError {
|
||||
fn description(&self) -> &str {
|
||||
"converted integer out of range for `char`"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue