mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
eq_repr should chase under reprs
This commit is contained in:
parent
5274dbcd00
commit
9a8d138424
1 changed files with 5 additions and 1 deletions
|
@ -195,7 +195,7 @@ pub trait LayoutInterner<'a>: Sized {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn eq_repr(&self, a: InLayout<'a>, b: InLayout<'a>) -> bool {
|
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;
|
fn target_info(&self) -> TargetInfo;
|
||||||
|
@ -473,6 +473,10 @@ impl<'a> InLayout<'a> {
|
||||||
Self(index, PhantomData)
|
Self(index, PhantomData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub(crate) const fn newtype(self) -> LayoutWrapper<'a> {
|
||||||
|
LayoutWrapper::Newtype(self)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn index(&self) -> usize {
|
pub fn index(&self) -> usize {
|
||||||
self.0
|
self.0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue