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ยง
- Bound
VarContext ๐
Enumsยง
- Binder
Scope ๐Type - NonLifetime
Binder ๐Allowed - Scope ๐
Traitsยง
- Region
Ext ๐
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 the opaque is coming from a span corresponding to edition 2024.
- provide ๐
- resolve_
bound_ ๐vars - Computes the
ResolveBoundVars
map that contains data for an entireItem
. You should not read the result of this query directly, but rather usenamed_variable_map
,late_bound_vars_map
, etc.
Type Aliasesยง
- Scope
Ref ๐