pub struct LiftCtxt<'a, 'genv, 'tcx> {
genv: GlobalEnv<'genv, 'tcx>,
opaque_tys: Option<&'a mut Vec<&'genv OpaqueTy<'genv>>>,
local_id_gen: &'a IndexGen<ItemLocalId>,
owner: MaybeExternId<OwnerId>,
}
Fields§
§genv: GlobalEnv<'genv, 'tcx>
§opaque_tys: Option<&'a mut Vec<&'genv OpaqueTy<'genv>>>
§local_id_gen: &'a IndexGen<ItemLocalId>
§owner: MaybeExternId<OwnerId>
Implementations§
Source§impl<'a, 'genv, 'tcx> LiftCtxt<'a, 'genv, 'tcx>
impl<'a, 'genv, 'tcx> LiftCtxt<'a, 'genv, 'tcx>
pub fn new( genv: GlobalEnv<'genv, 'tcx>, owner: MaybeExternId<OwnerId>, local_id_gen: &'a IndexGen<ItemLocalId>, opaque_tys: Option<&'a mut Vec<&'genv OpaqueTy<'genv>>>, ) -> Self
pub fn lift_generics(&mut self) -> Result<Generics<'genv>, ErrorGuaranteed>
pub fn lift_refined_by<'fhir>(&self) -> RefinedBy<'fhir>
pub fn lift_generic_param( &mut self, param: &GenericParam<'_>, ) -> Result<GenericParam<'genv>, ErrorGuaranteed>
fn lift_generics_inner( &mut self, generics: &Generics<'_>, ) -> Result<Generics<'genv>, ErrorGuaranteed>
fn lift_where_predicate( &mut self, pred: &WherePredicate<'_>, ) -> Result<WhereBoundPredicate<'genv>, ErrorGuaranteed>
fn lift_generic_bound( &mut self, bound: &GenericBound<'_>, ) -> Result<GenericBound<'genv>, ErrorGuaranteed>
fn lift_poly_trait_ref( &mut self, poly_trait_ref: PolyTraitRef<'_>, ) -> Result<PolyTraitRef<'genv>, ErrorGuaranteed>
fn lift_opaque_ty( &mut self, opaque_ty: &OpaqueTy<'_>, ) -> Result<OpaqueTy<'genv>, ErrorGuaranteed>
pub fn lift_fn_header(&mut self) -> FnHeader
pub fn lift_fn_decl(&mut self) -> Result<FnDecl<'genv>, ErrorGuaranteed>
fn lift_fn_decl_inner( &mut self, span: Span, decl: &FnDecl<'_>, ) -> Result<FnDecl<'genv>, ErrorGuaranteed>
fn lift_fn_ret_ty( &mut self, ret_ty: &FnRetTy<'_>, ) -> Result<Ty<'genv>, ErrorGuaranteed>
pub fn lift_type_alias(&mut self) -> Result<Item<'genv>, ErrorGuaranteed>
pub fn lift_field_def_id( &mut self, def_id: LocalDefId, ) -> Result<FieldDef<'genv>, ErrorGuaranteed>
pub fn lift_field_def( &mut self, field_def: &FieldDef<'_>, ) -> Result<FieldDef<'genv>, ErrorGuaranteed>
pub fn lift_enum_variant_id( &mut self, def_id: LocalDefId, ) -> Result<VariantDef<'genv>, ErrorGuaranteed>
pub fn lift_enum_variant( &mut self, variant: &Variant<'_>, ) -> Result<VariantDef<'genv>, ErrorGuaranteed>
pub fn lift_variant_ret(&mut self) -> VariantRet<'genv>
fn lift_variant_ret_inner( &mut self, generics: &Generics<'_>, ) -> VariantRet<'genv>
pub fn lift_ty(&mut self, ty: &Ty<'_>) -> Result<Ty<'genv>, ErrorGuaranteed>
fn lift_bare_fn( &mut self, span: Span, bare_fn: &BareFnTy<'_>, ) -> Result<BareFnTy<'genv>, ErrorGuaranteed>
fn lift_lifetime(&self, lft: &Lifetime) -> Result<Lifetime, ErrorGuaranteed>
fn lift_mut_ty( &mut self, mut_ty: MutTy<'_>, ) -> Result<MutTy<'genv>, ErrorGuaranteed>
fn lift_qpath( &mut self, qpath: QPath<'_>, ) -> Result<QPath<'genv>, ErrorGuaranteed>
fn lift_path(&mut self, path: &Path<'_>) -> Result<Path<'genv>, ErrorGuaranteed>
fn lift_path_segment( &mut self, segment: &PathSegment<'_>, ) -> Result<PathSegment<'genv>, ErrorGuaranteed>
fn lift_generic_args( &mut self, args: &[GenericArg<'_>], ) -> Result<&'genv [GenericArg<'genv>], ErrorGuaranteed>
fn lift_assoc_item_constraints( &mut self, constraints: &[AssocItemConstraint<'_>], ) -> Result<&'genv [AssocItemConstraint<'genv>], ErrorGuaranteed>
fn lift_array_len( &mut self, len: ArrayLen<'_>, ) -> Result<ConstArg, ErrorGuaranteed>
fn lift_const_arg(&mut self, const_arg: &ConstArg<'_>) -> ConstArg
fn insert_opaque_ty( &mut self, opaque_ty: OpaqueTy<'genv>, ) -> &'genv OpaqueTy<'genv>
fn emit_unsupported<T>(&self, msg: &str) -> Result<T, ErrorGuaranteed>
fn emit_err<'b, T>( &'b self, err: impl Diagnostic<'b>, ) -> Result<T, ErrorGuaranteed>
fn next_fhir_id(&self) -> FhirId
fn local_id(&self) -> LocalDefId
Auto Trait Implementations§
impl<'a, 'genv, 'tcx> Freeze for LiftCtxt<'a, 'genv, 'tcx>
impl<'a, 'genv, 'tcx> !RefUnwindSafe for LiftCtxt<'a, 'genv, 'tcx>
impl<'a, 'genv, 'tcx> !Send for LiftCtxt<'a, 'genv, 'tcx>
impl<'a, 'genv, 'tcx> !Sync for LiftCtxt<'a, 'genv, 'tcx>
impl<'a, 'genv, 'tcx> Unpin for LiftCtxt<'a, 'genv, 'tcx>
impl<'a, 'genv, 'tcx> !UnwindSafe for LiftCtxt<'a, 'genv, 'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more