Module resolve_bound_vars

Source
Expand description

Resolution of early vs late bound lifetimes.

Name resolution for lifetimes is performed on the AST and embedded into HIR. From this information, typechecking needs to transform the lifetime parameters into bound lifetimes. Lifetimes can be early-bound or late-bound. Construction of typechecking terms needs to visit the types in HIR to identify late-bound lifetimes and assign their Debruijn indices. This file is also responsible for assigning their semantics to implicit lifetimes in trait objects.

StructsΒ§

BoundVarContext πŸ”’

EnumsΒ§

BinderScopeType πŸ”’
NonLifetimeBinderAllowed πŸ”’
Scope πŸ”’

TraitsΒ§

RegionExt πŸ”’

FunctionsΒ§

deny_non_region_late_bound πŸ”’
generic_param_def_as_bound_arg πŸ”’
Turn a ty::GenericParamDef into a bound arg. Generally, this should only be used when turning early-bound vars into late-bound vars when lowering return type notation.
is_late_bound_map πŸ”’
Detects late-bound lifetimes and inserts them into late_bound.
late_arg_as_bound_arg πŸ”’
object_lifetime_default πŸ”’
opaque_captures_all_in_scope_lifetimes πŸ”’
Whether this opaque always captures lifetimes in scope. Right now, this is all RPITIT and TAITs, and when lifetime_capture_rules_2024 is enabled. We don’t check the span of the edition, since this is done on a per-opaque basis to account for nested opaques.
provide πŸ”’
resolve_bound_vars πŸ”’
Computes the ResolveBoundVars map that contains data for an entire Item. You should not read the result of this query directly, but rather use named_variable_map, late_bound_vars_map, etc.

Type AliasesΒ§

ScopeRef πŸ”’