mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-21 07:49:17 +03:00
Add method to get index of interned layout
This commit is contained in:
parent
c1a937e393
commit
c3064dad73
@ -372,6 +372,10 @@ impl<'a> InLayout<'a> {
|
||||
pub(crate) const unsafe fn from_index(index: usize) -> Self {
|
||||
Self(index, PhantomData)
|
||||
}
|
||||
|
||||
pub fn index(&self) -> usize {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
||||
/// A concurrent interner, suitable for usage between threads.
|
||||
|
Loading…
Reference in New Issue
Block a user