Skip to main content

luaur_analysis/methods/
replacer_clean_instantiation_2_alt_b.rs

1use crate::records::replacer::Replacer;
2use crate::type_aliases::type_pack_id::TypePackId;
3use luaur_common::macros::luau_assert::LUAU_ASSERT;
4
5impl Replacer {
6    pub fn clean_type_pack_id(&mut self, tp: TypePackId) -> TypePackId {
7        let res = unsafe { (*self.replacement_packs).find(&tp) }
8            .expect("TypePackId not found in replacement_packs");
9        LUAU_ASSERT!(!res.is_null());
10        let cleaned = *res;
11        self.base.dont_traverse_into_type_pack_id(cleaned);
12        cleaned
13    }
14}