luaur_analysis/methods/
unifier_2_unifier_2_unifier_2_alt_b.rs1use crate::records::builtin_types::BuiltinTypes;
2use crate::records::internal_error_reporter::InternalErrorReporter;
3use crate::records::scope::Scope;
4use crate::records::type_arena::TypeArena;
5use crate::records::type_check_limits::TypeCheckLimits;
6use crate::records::type_pair_hash::TypePairHash;
7use crate::records::unifier_2::Unifier2;
8use crate::type_aliases::type_id::TypeId;
9use crate::type_aliases::type_pack_id::TypePackId;
10use alloc::vec::Vec;
11use core::ffi::c_void;
12use core::ptr::NonNull;
13use luaur_common::records::dense_hash_map::DenseHashMap;
14use luaur_common::records::dense_hash_set::DenseHashSet;
15use luaur_common::DFInt;
16
17impl Unifier2 {
18 pub fn unifier_2_not_null_type_arena_not_null_builtin_types_not_null_scope_not_null_internal_error_reporter_dense_hash_set_void(
19 _arena: NonNull<TypeArena>,
20 _builtin_types: NonNull<BuiltinTypes>,
21 _scope: NonNull<Scope>,
22 _ice: NonNull<InternalErrorReporter>,
23 _uninhabited_type_functions: *mut DenseHashSet<*const core::ffi::c_void>,
24 ) -> Self {
25 Unifier2 {
26 arena: _arena,
27 builtin_types: _builtin_types,
28 scope: _scope,
29 ice: _ice,
30 limits: TypeCheckLimits::default(),
31 seen_type_pairings: DenseHashSet::<(TypeId, TypeId), TypePairHash>::new((
32 core::ptr::null(),
33 core::ptr::null(),
34 )),
35 seen_type_pack_pairings: DenseHashSet::<(TypePackId, TypePackId), TypePairHash>::new((
36 core::ptr::null(),
37 core::ptr::null(),
38 )),
39 expanded_free_types: DenseHashMap::new(core::ptr::null()),
40 generic_substitutions: DenseHashMap::new(core::ptr::null()),
41 generic_pack_substitutions: DenseHashMap::new(core::ptr::null()),
42 new_fresh_types: Vec::new(),
43 new_fresh_type_packs: Vec::new(),
44 iteration_count: 0,
45 recursion_count: 0,
46 recursion_limit: DFInt::LuauUnifierRecursionLimit.get() as i32,
47 incomplete_subtypes: Vec::new(),
48 uninhabited_type_functions: _uninhabited_type_functions,
49 }
50 }
51}