Don't make from_reserved_index public

This commit is contained in:
Ayaz Hafiz 2023-01-04 13:52:22 -06:00
parent 856ee91642
commit 68d6de79de
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -242,7 +242,7 @@ impl<'a> InLayout<'a> {
/// let inserted = interner.insert("something");
/// assert_eq!(reserved_interned, inserted);
/// ```
pub(crate) const unsafe fn from_reserved_index(index: usize) -> Self {
const unsafe fn from_reserved_index(index: usize) -> Self {
Self(index, PhantomData)
}
}
@ -403,6 +403,8 @@ impl<'a> GlobalLayoutInterner<'a> {
vec.push(lambda_set_layout);
// TODO: Is it helpful to persist the hash and give it back to the thread-local
// interner?
let _old = map.insert(lambda_set_layout, slot);
debug_assert!(_old.is_none());