Expand description
Region (lifetime) helpers shared by the VM and the property checker.
Functions§
- fn_
arg_ 🔒ty - The type of
def_id’s argument atindex. - fn_
return_ 🔒region - The reference region of
def_id’s return type (&'r T→Some('r)). - free_
region_ 🔒outlives - Consult the function’s declared outlives constraints (where-clauses) via
rustc’s
FreeRegionMap, which records'a: 'bbounds and their transitive closure.sub_free_regions(r_a, r_b)testsr_a <= r_b(i.e.r_b: r_a), sosrc: retissub_free_regions(ret, src). - liberate_
fn_ 🔒sig - The function’s signature with late-bound regions liberated to free
ReLateParams, so reference regions are comparable (MIR erases them toReErased). - region_
outlives 🔒 - Whether
srcoutlivesret(src: ret). - region_
outlives_ 🔒implied - Whether
src_regionprovably outlives the reference region ofself_tyvia the type’s own well-formedness. A reference parameter&'r SliceHost<'s>requires its pointee’s regions to outlive'r('s: 'r), which the where-clause-onlyregion_outlivescannot see. Complements it with the implied outlives components ofself_ty. - resolve_
region_ 🔒name - Resolve a lifetime name from a contract (e.g.
"a","static") to a concreteRegion.nameis the raw ident, without the leading'.