pub trait RegionExt<'tcx> {
// Required methods
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>;
fn new_error(tcx: TyCtxt<'tcx>, guar: ErrorGuaranteed) -> Region<'tcx>;
fn new_error_misc(tcx: TyCtxt<'tcx>) -> Region<'tcx>;
fn new_error_with_message<S: Into<MultiSpan>>(
tcx: TyCtxt<'tcx>,
span: S,
msg: &'static str,
) -> Region<'tcx>;
fn new_from_kind(tcx: TyCtxt<'tcx>, kind: RegionKind<'tcx>) -> Region<'tcx>;
}Required Methods§
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>
Sourcefn new_error(tcx: TyCtxt<'tcx>, guar: ErrorGuaranteed) -> Region<'tcx>
fn new_error(tcx: TyCtxt<'tcx>, guar: ErrorGuaranteed) -> Region<'tcx>
Constructs a RegionKind::ReError region.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".