use {crate::Linearize, core::convert::Infallible};
unsafe impl Linearize for Infallible {
type Storage<T> = [T; Self::LENGTH];
type CopyStorage<T>
= [T; Self::LENGTH]
where
T: Copy;
const LENGTH: usize = 0;
#[inline]
fn linearize(&self) -> usize {
unsafe {
cold_unreachable!();
}
}
#[inline]
unsafe fn from_linear_unchecked(_linear: usize) -> Self
where
Self: Sized,
{
unsafe {
cold_unreachable!();
}
}
}
impl_assert!(Infallible, 0);