Expand description
Code to extract the universally quantified regions declared on a function. For example:
fn foo<'a, 'b, 'c: 'b>() { }here we would return a map assigning each of {'a, 'b, 'c}
to an index.
The code in this file doesnβt do anything with those results; it just returns them for other code to use.
Re-exportsΒ§
use std::cell::Cell;πuse std::iter;πuse rustc_attr_ir::lang_items::LangItem;πuse rustc_data_structures::fx::FxIndexMap;πuse rustc_errors::Diag;πuse rustc_hir::BodyOwnerKind;πuse rustc_hir::def::DefKind;πuse rustc_hir::def_id::DefId;πuse rustc_hir::def_id::LocalDefId;πuse rustc_index::IndexVec;πuse rustc_infer::infer::NllRegionVariableOrigin;πuse rustc_macros::extension;πuse rustc_middle::mir::RETURN_PLACE;πuse rustc_middle::ty::print::with_no_trimmed_paths;πuse rustc_middle::ty::print::with_no_trimmed_paths;πuse rustc_middle::ty;πuse rustc_middle::ty::BoundVariableKind;πuse rustc_middle::ty::GenericArgs;πuse rustc_middle::ty::InlineConstArgs;πuse rustc_middle::ty::InlineConstArgsParts;πuse rustc_middle::ty::List;πuse rustc_middle::ty::RegionVid;πuse rustc_middle::ty::Ty;πuse rustc_middle::ty::TyCtxt;πuse rustc_middle::ty::TypeFoldable;πuse rustc_middle::ty::TypeVisitableExt;πuse rustc_middle::ty::fold_regions;πuse rustc_span::ErrorGuaranteed;πuse rustc_span::bug;πuse rustc_span::kw;πuse rustc_span::span_bug;πuse rustc_span::sym;πuse tracing::debug;πuse tracing::instrument;πuse tracing::instrument;πuse crate::BorrowckInferCtxt;πuse crate::renumber::RegionCtxt;π
StructsΒ§
- Universal
Region πIndices - Universal
Regions π - Universal
Regions πBuilder
EnumsΒ§
- Defining
Ty π - 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.
- Region
Classification π
ConstantsΒ§
- FIRST_
GLOBAL_ πINDEX
TraitsΒ§
- Infer
Ctxt πExt
FunctionsΒ§
- for_
each_ πlate_ bound_ region_ in_ item - Iterates over the late-bound regions defined on
mir_def_idand all of its parents, up to the typeck root, and invokesfwith the liberated form of each one. - for_
each_ πlate_ bound_ region_ in_ recursive_ scope - Iterates over the late-bound regions defined on
mir_def_idand all of its parents, up to the typeck root, and invokesfwith the liberated form of each one.