We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 597f432 commit 24d89e5Copy full SHA for 24d89e5
src/libcore/array.rs
@@ -11,7 +11,7 @@
11
12
use crate::borrow::{Borrow, BorrowMut};
13
use crate::cmp::Ordering;
14
-use crate::convert::TryFrom;
+use crate::convert::{Infallible, TryFrom};
15
use crate::fmt;
16
use crate::hash::{Hash, self};
17
use crate::marker::Unsize;
@@ -72,6 +72,13 @@ impl TryFromSliceError {
72
}
73
74
75
+#[stable(feature = "try_from_slice_error", since = "1.36.0")]
76
+impl From<Infallible> for TryFromSliceError {
77
+ fn from(x: Infallible) -> TryFromSliceError {
78
+ match x {}
79
+ }
80
+}
81
+
82
macro_rules! __impl_slice_eq1 {
83
($Lhs: ty, $Rhs: ty) => {
84
__impl_slice_eq1! { $Lhs, $Rhs, Sized }
0 commit comments