mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Add method to get index of interned layout
This commit is contained in:
parent
c1a937e393
commit
c3064dad73
1 changed files with 4 additions and 0 deletions
|
@ -372,6 +372,10 @@ impl<'a> InLayout<'a> {
|
||||||
pub(crate) const unsafe fn from_index(index: usize) -> Self {
|
pub(crate) const unsafe fn from_index(index: usize) -> Self {
|
||||||
Self(index, PhantomData)
|
Self(index, PhantomData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn index(&self) -> usize {
|
||||||
|
self.0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A concurrent interner, suitable for usage between threads.
|
/// A concurrent interner, suitable for usage between threads.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue