Skip to main content

Module scope

Module scope 

Source

StructsΒ§

NameResolution πŸ”’
Scope
Name resolution scope, used when converting types/function-bodies etc into symbols.
ScopeChain πŸ”’
A link in the scope resolution chain. We first attempt to resolve an identifier in the associated ScopeChainKind and, if nothing is found, proceed to the next link.
resolve_ast_use πŸ”’

EnumsΒ§

NameResolutionSym
Result of name resolution.
ScopeChainKind
A link the scope resolution chain.

TraitsΒ§

Resolve
Full name resolution: This requires converting generic arguments into symbols which entails some amount of type checking and interacting with the environment. This is therefore an async function.
ResolveAgainst πŸ”’
ResolveToSym
Partial name resolution: This simply extracts what symbol has been named by the user in a path. It can by synchronous and only requires a scope, not a type checking environment. This is used when creating default permissions, as we want to be able to do that before type checking has truly begun.

FunctionsΒ§

report_path_referencing_field πŸ”’
Reports an error if the user gave a path like Foo.Bar and Foo wound up being a class that doesn’t have nested items.
resolve_ast_use πŸ”’
resolve_name_against_crate πŸ”’