impl From<Infallible> for TryFromIntError.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
use convert::TryFrom;
|
||||
use convert::{Infallible, TryFrom};
|
||||
use fmt;
|
||||
use intrinsics;
|
||||
use str::FromStr;
|
||||
@@ -2503,6 +2503,13 @@ impl fmt::Display for TryFromIntError {
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "try_from", issue = "33417")]
|
||||
impl From<Infallible> for TryFromIntError {
|
||||
fn from(_: Infallible) -> TryFromIntError {
|
||||
TryFromIntError(())
|
||||
}
|
||||
}
|
||||
|
||||
// no possible bounds violation
|
||||
macro_rules! try_from_unbounded {
|
||||
($source:ty, $($target:ty),*) => {$(
|
||||
|
||||
Reference in New Issue
Block a user