Store specialized variable for use in dbg as fake symbol in lowlevel call

This commit is contained in:
Ayaz Hafiz 2022-12-14 16:23:08 -06:00
parent fe90355265
commit a96225e92e
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
6 changed files with 48 additions and 8 deletions

View file

@ -594,6 +594,13 @@ impl IdentId {
pub const fn index(self) -> usize {
self.0 as usize
}
/// # Safety
///
/// The index is not guaranteed to know to exist.
pub unsafe fn from_index(index: u32) -> Self {
Self(index)
}
}
/// Stores a mapping between Ident and IdentId.