flux_middle::fhir::lift

Struct LiftCtxt

Source
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>

Source

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

Source

pub fn lift_generics(&mut self) -> Result<Generics<'genv>, ErrorGuaranteed>

Source

pub fn lift_refined_by<'fhir>(&self) -> RefinedBy<'fhir>

Source

pub fn lift_generic_param( &mut self, param: &GenericParam<'_>, ) -> Result<GenericParam<'genv>, ErrorGuaranteed>

Source

fn lift_generics_inner( &mut self, generics: &Generics<'_>, ) -> Result<Generics<'genv>, ErrorGuaranteed>

Source

fn lift_where_predicate( &mut self, pred: &WherePredicate<'_>, ) -> Result<WhereBoundPredicate<'genv>, ErrorGuaranteed>

Source

fn lift_generic_bound( &mut self, bound: &GenericBound<'_>, ) -> Result<GenericBound<'genv>, ErrorGuaranteed>

Source

fn lift_poly_trait_ref( &mut self, poly_trait_ref: PolyTraitRef<'_>, ) -> Result<PolyTraitRef<'genv>, ErrorGuaranteed>

Source

fn lift_opaque_ty( &mut self, opaque_ty: &OpaqueTy<'_>, ) -> Result<OpaqueTy<'genv>, ErrorGuaranteed>

Source

pub fn lift_fn_header(&mut self) -> FnHeader

Source

pub fn lift_fn_decl(&mut self) -> Result<FnDecl<'genv>, ErrorGuaranteed>

Source

fn lift_fn_decl_inner( &mut self, span: Span, decl: &FnDecl<'_>, ) -> Result<FnDecl<'genv>, ErrorGuaranteed>

Source

fn lift_fn_ret_ty( &mut self, ret_ty: &FnRetTy<'_>, ) -> Result<Ty<'genv>, ErrorGuaranteed>

Source

pub fn lift_type_alias(&mut self) -> Result<Item<'genv>, ErrorGuaranteed>

Source

pub fn lift_field_def_id( &mut self, def_id: LocalDefId, ) -> Result<FieldDef<'genv>, ErrorGuaranteed>

Source

pub fn lift_field_def( &mut self, field_def: &FieldDef<'_>, ) -> Result<FieldDef<'genv>, ErrorGuaranteed>

Source

pub fn lift_enum_variant_id( &mut self, def_id: LocalDefId, ) -> Result<VariantDef<'genv>, ErrorGuaranteed>

Source

pub fn lift_enum_variant( &mut self, variant: &Variant<'_>, ) -> Result<VariantDef<'genv>, ErrorGuaranteed>

Source

pub fn lift_variant_ret(&mut self) -> VariantRet<'genv>

Source

fn lift_variant_ret_inner( &mut self, generics: &Generics<'_>, ) -> VariantRet<'genv>

Source

pub fn lift_ty(&mut self, ty: &Ty<'_>) -> Result<Ty<'genv>, ErrorGuaranteed>

Source

fn lift_bare_fn( &mut self, span: Span, bare_fn: &BareFnTy<'_>, ) -> Result<BareFnTy<'genv>, ErrorGuaranteed>

Source

fn lift_lifetime(&self, lft: &Lifetime) -> Result<Lifetime, ErrorGuaranteed>

Source

fn lift_mut_ty( &mut self, mut_ty: MutTy<'_>, ) -> Result<MutTy<'genv>, ErrorGuaranteed>

Source

fn lift_qpath( &mut self, qpath: QPath<'_>, ) -> Result<QPath<'genv>, ErrorGuaranteed>

Source

fn lift_path(&mut self, path: &Path<'_>) -> Result<Path<'genv>, ErrorGuaranteed>

Source

fn lift_path_segment( &mut self, segment: &PathSegment<'_>, ) -> Result<PathSegment<'genv>, ErrorGuaranteed>

Source

fn lift_generic_args( &mut self, args: &[GenericArg<'_>], ) -> Result<&'genv [GenericArg<'genv>], ErrorGuaranteed>

Source

fn lift_assoc_item_constraints( &mut self, constraints: &[AssocItemConstraint<'_>], ) -> Result<&'genv [AssocItemConstraint<'genv>], ErrorGuaranteed>

Source

fn lift_array_len( &mut self, len: ArrayLen<'_>, ) -> Result<ConstArg, ErrorGuaranteed>

Source

fn lift_const_arg(&mut self, const_arg: &ConstArg<'_>) -> ConstArg

Source

fn insert_opaque_ty( &mut self, opaque_ty: OpaqueTy<'genv>, ) -> &'genv OpaqueTy<'genv>

Source

fn emit_unsupported<T>(&self, msg: &str) -> Result<T, ErrorGuaranteed>

Source

fn emit_err<'b, T>( &'b self, err: impl Diagnostic<'b>, ) -> Result<T, ErrorGuaranteed>

Source

fn next_fhir_id(&self) -> FhirId

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<P> IntoQueryParam<P> for P

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.