Skip to main content

Module region

Module region 

Source
Expand description

Region (lifetime) helpers shared by the VM and the property checker.

Functions§

fn_arg_ty 🔒
The type of def_id’s argument at index.
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: 'b bounds and their transitive closure. sub_free_regions(r_a, r_b) tests r_a <= r_b (i.e. r_b: r_a), so src: ret is sub_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 to ReErased).
region_outlives 🔒
Whether src outlives ret (src: ret).
region_outlives_implied 🔒
Whether src_region provably outlives the reference region of self_ty via 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-only region_outlives cannot see. Complements it with the implied outlives components of self_ty.
resolve_region_name 🔒
Resolve a lifetime name from a contract (e.g. "a", "static") to a concrete Region. name is the raw ident, without the leading '.