flux_fhir_analysis::conv::struct_compat

Struct Zipper

Source
struct Zipper<'genv, 'tcx> {
    genv: GlobalEnv<'genv, 'tcx>,
    owner_id: MaybeExternId,
    locs: UnordMap<Loc, Ty>,
    holes: Holes,
    a_binders: u32,
    b_binder_to_a_binder: Vec<Option<u32>>,
    errors: Errors<'genv>,
}

Fields§

§genv: GlobalEnv<'genv, 'tcx>§owner_id: MaybeExternId§locs: UnordMap<Loc, Ty>§holes: Holes§a_binders: u32

Number of binders we’ve entered in a

§b_binder_to_a_binder: Vec<Option<u32>>

Each element in the vector correspond to a binder in b. For some binders we map it to a corresponding binder in a. We assume that expressions filling holes will only contain variables pointing to some of these mapped binders.

§errors: Errors<'genv>

Implementations§

Source§

impl<'genv, 'tcx> Zipper<'genv, 'tcx>

Source

fn new(genv: GlobalEnv<'genv, 'tcx>, owner_id: MaybeExternId) -> Self

Source

fn zip_poly_fn_sig( &mut self, a: &PolyFnSig, b: &PolyFnSig, ) -> Result<(), FnSigErr>

Source

fn zip_variant( &mut self, a: &PolyVariant, b: &PolyVariant, variant_idx: VariantIdx, )

Source

fn zip_fn_sig(&mut self, a: &FnSig, b: &FnSig) -> Result<(), FnSigErr>

Source

fn zip_output(&mut self, a: &FnOutput, b: &FnOutput) -> Result<(), FnSigErr>

Source

fn zip_ty(&mut self, a: &Ty, b: &Ty) -> Result<(), Mismatch>

Source

fn zip_bty(&mut self, a: &BaseTy, b: &BaseTy) -> Result<(), Mismatch>

Source

fn zip_generic_arg( &mut self, a: &GenericArg, b: &GenericArg, ) -> Result<(), Mismatch>

Source

fn zip_sorts(&mut self, a: &Sort, b: &Sort)

Source

fn zip_subset_ty(&mut self, a: &SubsetTy, b: &SubsetTy) -> Result<(), Mismatch>

Source

fn zip_const(&mut self, a: &Const, b: &Const) -> Result<(), Mismatch>

Source

fn zip_region(&mut self, a: &Region, b: &Region)

Source

fn zip_poly_existential_pred( &mut self, a: &Binder<ExistentialPredicate>, b: &Binder<ExistentialPredicate>, ) -> Result<(), Mismatch>

Source

fn enter_binders<T, R>( &mut self, a: &Binder<T>, b: &Binder<T>, f: impl FnOnce(&mut Self, &T, &T) -> R, ) -> R

Enter a binder in both a and b creating a mapping between the two.

Source

fn enter_a_binder<T, R>( &mut self, t: &Binder<T>, f: impl FnOnce(&mut Self, &T) -> R, ) -> R

Enter a binder in a without a corresponding mapping in b

Source

fn enter_b_binder<T, R>( &mut self, t: &Binder<T>, f: impl FnOnce(&mut Self, &T) -> R, ) -> R

Enter a binder in b without a corresponding mapping in a

Source

fn adjust_bvars<T: TypeFoldable + Clone + Debug>(&self, t: &T) -> T

Source

fn emit_fn_sig_err(&mut self, err: FnSigErr, decl: &FnDecl<'_>)

Auto Trait Implementations§

§

impl<'genv, 'tcx> !Freeze for Zipper<'genv, 'tcx>

§

impl<'genv, 'tcx> !RefUnwindSafe for Zipper<'genv, 'tcx>

§

impl<'genv, 'tcx> !Send for Zipper<'genv, 'tcx>

§

impl<'genv, 'tcx> !Sync for Zipper<'genv, 'tcx>

§

impl<'genv, 'tcx> Unpin for Zipper<'genv, 'tcx>

§

impl<'genv, 'tcx> !UnwindSafe for Zipper<'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<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.