eq_repr should chase under reprs

This commit is contained in:
Ayaz Hafiz 2023-05-11 12:24:24 -05:00
parent 5274dbcd00
commit 9a8d138424
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -195,7 +195,7 @@ pub trait LayoutInterner<'a>: Sized {
}
fn eq_repr(&self, a: InLayout<'a>, b: InLayout<'a>) -> bool {
self.get(a).repr == self.get(b).repr
self.get_repr(a) == self.get_repr(b)
}
fn target_info(&self) -> TargetInfo;
@ -473,6 +473,10 @@ impl<'a> InLayout<'a> {
Self(index, PhantomData)
}
pub(crate) const fn newtype(self) -> LayoutWrapper<'a> {
LayoutWrapper::Newtype(self)
}
pub fn index(&self) -> usize {
self.0
}