pub struct SubtypingEnvironment {
pub parent: *mut SubtypingEnvironment,
pub mapped_generics: DenseHashMap<TypeId, Vec<GenericBounds>>,
pub mapped_generic_packs: MappedGenericEnvironment,
pub substitutions: DenseHashMap<TypeId, TypeId>,
pub seen_set_cache: DenseHashMap<(TypeId, TypeId), SubtypingResult, TypePairHash>,
pub iteration_count: i32,
}Fields§
§parent: *mut SubtypingEnvironment§mapped_generics: DenseHashMap<TypeId, Vec<GenericBounds>>§mapped_generic_packs: MappedGenericEnvironment§substitutions: DenseHashMap<TypeId, TypeId>§seen_set_cache: DenseHashMap<(TypeId, TypeId), SubtypingResult, TypePairHash>§iteration_count: i32Implementations§
Source§impl SubtypingEnvironment
impl SubtypingEnvironment
Sourcepub fn apply_mapped_generics(
&mut self,
builtin_types: *mut BuiltinTypes,
arena: *mut TypeArena,
ty: TypeId,
ice_reporter: *mut InternalErrorReporter,
) -> Option<TypeId>
pub fn apply_mapped_generics( &mut self, builtin_types: *mut BuiltinTypes, arena: *mut TypeArena, ty: TypeId, ice_reporter: *mut InternalErrorReporter, ) -> Option<TypeId>
C++ SubtypingEnvironment::applyMappedGenerics (Subtyping.cpp:504-513):
ApplyMappedGenerics amg{builtinTypes, arena, *this, iceReporter};
return amg.substitute(ty);ApplyMappedGenerics extends Substitution and inherits substitute,
whose traversal virtual-dispatches into the overridden isDirty /
clean / ignoreChildren. The Rust ApplyMappedGenerics now embeds
base: Substitution and installs those overrides into the
SubstitutionVtable from its substitute_type_id wrapper.
Source§impl SubtypingEnvironment
impl SubtypingEnvironment
pub fn contains_mapped_pack(&self, tp: TypePackId) -> bool
Source§impl SubtypingEnvironment
impl SubtypingEnvironment
pub fn contains_mapped_type(&self, ty: TypeId) -> bool
Source§impl SubtypingEnvironment
impl SubtypingEnvironment
pub fn get_mapped_type_bounds( &mut self, ty: TypeId, ice_reporter: *mut InternalErrorReporter, ) -> &mut GenericBounds
Source§impl SubtypingEnvironment
impl SubtypingEnvironment
pub fn lookup_generic_pack(&self, tp: TypePackId) -> LookupResult
Source§impl SubtypingEnvironment
impl SubtypingEnvironment
pub fn try_find_substitution(&self, ty: TypeId) -> Option<TypeId>
Source§impl SubtypingEnvironment
impl SubtypingEnvironment
pub fn try_find_subtyping_result( &self, sub_and_super: (TypeId, TypeId), ) -> Option<&SubtypingResult>
Trait Implementations§
Auto Trait Implementations§
impl !Send for SubtypingEnvironment
impl !Sync for SubtypingEnvironment
impl Freeze for SubtypingEnvironment
impl RefUnwindSafe for SubtypingEnvironment
impl Unpin for SubtypingEnvironment
impl UnsafeUnpin for SubtypingEnvironment
impl UnwindSafe for SubtypingEnvironment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more