pub struct Scope {Show 24 fields
pub parent: Option<ScopePtr>,
pub children: Vec<*mut Scope>,
pub bindings: HashMap<Symbol, Binding>,
pub return_type: TypePackId,
pub vararg_pack: Option<TypePackId>,
pub level: TypeLevel,
pub location: Location,
pub exported_type_bindings: HashMap<Name, TypeFun>,
pub private_type_bindings: HashMap<Name, TypeFun>,
pub type_alias_locations: HashMap<Name, Location>,
pub type_alias_name_locations: HashMap<Name, Location>,
pub imported_modules: HashMap<Name, ModuleName>,
pub imported_type_bindings: HashMap<Name, HashMap<Name, TypeFun>>,
pub builtin_type_names: DenseHashSet<Name>,
pub private_type_pack_bindings: HashMap<Name, TypePackId>,
pub refinements: RefinementMap,
pub lvalue_types: DenseHashMap<*const Def, TypeId>,
pub rvalue_refinements: DenseHashMap<*const Def, TypeId>,
pub globals_to_warn: DenseHashSet<String>,
pub type_alias_type_parameters: HashMap<Name, TypeId>,
pub type_alias_type_pack_parameters: HashMap<Name, TypePackId>,
pub interior_free_types: Option<Vec<TypeId>>,
pub interior_free_type_packs: Option<Vec<TypePackId>>,
pub invalid_type_aliases: DenseHashMap<String, Location>,
}Fields§
§parent: Option<ScopePtr>§children: Vec<*mut Scope>§bindings: HashMap<Symbol, Binding>§return_type: TypePackId§vararg_pack: Option<TypePackId>§level: TypeLevel§location: Locationthe spanning location associated with this scope
exported_type_bindings: HashMap<Name, TypeFun>§private_type_bindings: HashMap<Name, TypeFun>§type_alias_locations: HashMap<Name, Location>§type_alias_name_locations: HashMap<Name, Location>§imported_modules: HashMap<Name, ModuleName>Mapping from the name in the require statement to the internal moduleName.
imported_type_bindings: HashMap<Name, HashMap<Name, TypeFun>>§builtin_type_names: DenseHashSet<Name>§private_type_pack_bindings: HashMap<Name, TypePackId>§refinements: RefinementMap§lvalue_types: DenseHashMap<*const Def, TypeId>§rvalue_refinements: DenseHashMap<*const Def, TypeId>§globals_to_warn: DenseHashSet<String>§type_alias_type_parameters: HashMap<Name, TypeId>§type_alias_type_pack_parameters: HashMap<Name, TypePackId>§interior_free_types: Option<Vec<TypeId>>§interior_free_type_packs: Option<Vec<TypePackId>>§invalid_type_aliases: DenseHashMap<String, Location>Implementations§
Source§impl Scope
impl Scope
pub fn find_narrowest_scope_containing( &mut self, location: Location, ) -> *mut Scope
Source§impl Scope
impl Scope
pub fn lookup_pack(&self, name: &Name) -> Option<TypePackId>
Source§impl Scope
impl Scope
Sourcepub fn lookup_r_value_refinement_type(&self, def: DefId) -> Option<TypeId>
pub fn lookup_r_value_refinement_type(&self, def: DefId) -> Option<TypeId>
std::optional<TypeId> Scope::lookupRValueRefinementType(DefId def) const
(Scope.cpp:87-96).
Source§impl Scope
impl Scope
Sourcepub fn lookup_def_id(&self, def: DefId) -> Option<TypeId>
pub fn lookup_def_id(&self, def: DefId) -> Option<TypeId>
std::optional<TypeId> Scope::lookup(DefId def) const (Scope.cpp:98-110).
Source§impl Scope
impl Scope
pub fn scope_type_pack_id(return_type: TypePackId) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !Send for Scope
impl !Sync for Scope
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Unpin for Scope
impl UnsafeUnpin for Scope
impl UnwindSafe for Scope
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