pub type Region<'tcx> = Region<TyCtxt<'tcx>>;Aliased Type§
pub struct Region<'tcx>(pub Interned<'tcx, RegionKind<TyCtxt<'tcx>>>);Tuple Fields§
§0: Interned<'tcx, RegionKind<TyCtxt<'tcx>>>Trait Implementations§
Source§impl<'tcx> RegionExt<'tcx> for Region<'tcx>
impl<'tcx> RegionExt<'tcx> for Region<'tcx>
Source§fn new_error(tcx: TyCtxt<'tcx>, guar: ErrorGuaranteed) -> Region<'tcx>
fn new_error(tcx: TyCtxt<'tcx>, guar: ErrorGuaranteed) -> Region<'tcx>
Constructs a RegionKind::ReError region.
Source§fn new_error_misc(tcx: TyCtxt<'tcx>) -> Region<'tcx>
fn new_error_misc(tcx: TyCtxt<'tcx>) -> Region<'tcx>
Constructs a RegionKind::ReError region and registers a delayed bug to ensure it gets
used.
Source§fn new_error_with_message<S: Into<MultiSpan>>(
tcx: TyCtxt<'tcx>,
span: S,
msg: &'static str,
) -> Region<'tcx>
fn new_error_with_message<S: Into<MultiSpan>>( tcx: TyCtxt<'tcx>, span: S, msg: &'static str, ) -> Region<'tcx>
Constructs a RegionKind::ReError region and registers a delayed bug with the given msg
to ensure it gets used.
Source§fn new_from_kind(tcx: TyCtxt<'tcx>, kind: RegionKind<'tcx>) -> Region<'tcx>
fn new_from_kind(tcx: TyCtxt<'tcx>, kind: RegionKind<'tcx>) -> Region<'tcx>
Avoid this in favour of more specific new_* methods, where possible,
to avoid the cost of the match.
fn new_early_param( tcx: TyCtxt<'tcx>, early_bound_region: EarlyParamRegion, ) -> Region<'tcx>
fn new_late_param( tcx: TyCtxt<'tcx>, scope: DefId, kind: LateParamRegionKind, ) -> Region<'tcx>
fn new_var(tcx: TyCtxt<'tcx>, v: RegionVid) -> Region<'tcx>
Source§impl<'tcx> RegionUtilitiesExt<'tcx> for Region<'tcx>
impl<'tcx> RegionUtilitiesExt<'tcx> for Region<'tcx>
Source§fn is_free(self) -> bool
fn is_free(self) -> bool
True for free region in the current context.
This is the case for 'static and param regions.
Source§fn opt_param_def_id(
self,
tcx: TyCtxt<'tcx>,
binding_item: DefId,
) -> Option<DefId>
fn opt_param_def_id( self, tcx: TyCtxt<'tcx>, binding_item: DefId, ) -> Option<DefId>
Given some item binding_item, check if this region is a generic parameter introduced by it
or one of the parent generics. Returns the DefId of the parameter definition if so.
fn get_name(self, tcx: TyCtxt<'tcx>) -> Option<Symbol>
fn get_name_or_anon(self, tcx: TyCtxt<'tcx>) -> Symbol
fn is_error(self) -> bool
fn is_static(self) -> bool
fn is_erased(self) -> bool
fn is_placeholder(self) -> bool
fn bound_at_or_above_binder(self, index: DebruijnIndex) -> bool
fn is_var(self) -> bool
fn as_var(self) -> RegionVid
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes