Module rustc_mir::borrow_check::nll::universal_regions[][src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Code to extract the universally quantified regions declared on a function and the relationships between them. For example:

fn foo<'a, 'b, 'c: 'b>() { }

here we would be returning a map assigning each of {'a, 'b, 'c} to an index, as well as the FreeRegionMap which can compute relationships between them.

The code in this file doesn't do anything with those results; it just returns them for other code to use.

Re-exports

use rustc::hir::BodyOwnerKind;
use rustc::hir::HirId;
use rustc::hir::def_id::DefId;
use rustc::infer::InferCtxt;
use rustc::infer::NLLRegionVariableOrigin;
use rustc::infer::region_constraints::GenericKind;
use rustc::infer::outlives::bounds;
use rustc::infer::outlives::bounds::OutlivesBound;
use rustc::infer::outlives::free_region_map::FreeRegionRelations;
use rustc::ty;
use rustc::ty::RegionVid;
use rustc::ty::Ty;
use rustc::ty::TyCtxt;
use rustc::ty::fold::TypeFoldable;
use rustc::ty::subst::Substs;
use rustc::util::nodemap::FxHashMap;
use rustc_data_structures::indexed_vec::Idx;
use rustc_data_structures::indexed_vec::IndexVec;
use rustc_data_structures::transitive_relation::TransitiveRelation;
use std::iter;
use syntax::ast;
use super::ToRegionVid;

Structs

UniversalRegionIndices [
Experimental
]
UniversalRegionRelations [
Experimental
]
UniversalRegions [
Experimental
]
UniversalRegionsBuilder [
Experimental
]

Enums

DefiningTy [
Experimental
]

The "defining type" for this MIR. The key feature of the "defining type" is that it contains the information needed to derive all the universal regions that are in scope as well as the types of the inputs/output from the MIR. In general, early-bound universal regions appear free in the defining type and late-bound regions appear bound in the signature.

RegionClassification [
Experimental
]

Constants

FIRST_GLOBAL_INDEX [
Experimental
]
FR [
Experimental
]

Traits

InferCtxtExt [
Experimental
]