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>
impl<'genv, 'tcx> Zipper<'genv, 'tcx>
fn new(genv: GlobalEnv<'genv, 'tcx>, owner_id: MaybeExternId) -> Self
fn zip_poly_fn_sig( &mut self, a: &PolyFnSig, b: &PolyFnSig, ) -> Result<(), FnSigErr>
fn zip_variant( &mut self, a: &PolyVariant, b: &PolyVariant, variant_idx: VariantIdx, )
fn zip_fn_sig(&mut self, a: &FnSig, b: &FnSig) -> Result<(), FnSigErr>
fn zip_output(&mut self, a: &FnOutput, b: &FnOutput) -> Result<(), FnSigErr>
fn zip_ty(&mut self, a: &Ty, b: &Ty) -> Result<(), Mismatch>
fn zip_bty(&mut self, a: &BaseTy, b: &BaseTy) -> Result<(), Mismatch>
fn zip_generic_arg( &mut self, a: &GenericArg, b: &GenericArg, ) -> Result<(), Mismatch>
fn zip_sorts(&mut self, a: &Sort, b: &Sort)
fn zip_subset_ty(&mut self, a: &SubsetTy, b: &SubsetTy) -> Result<(), Mismatch>
fn zip_const(&mut self, a: &Const, b: &Const) -> Result<(), Mismatch>
fn zip_region(&mut self, a: &Region, b: &Region)
fn zip_poly_existential_pred( &mut self, a: &Binder<ExistentialPredicate>, b: &Binder<ExistentialPredicate>, ) -> Result<(), Mismatch>
Sourcefn enter_binders<T, R>(
&mut self,
a: &Binder<T>,
b: &Binder<T>,
f: impl FnOnce(&mut Self, &T, &T) -> R,
) -> R
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.
Sourcefn enter_a_binder<T, R>(
&mut self,
t: &Binder<T>,
f: impl FnOnce(&mut Self, &T) -> R,
) -> R
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
Sourcefn enter_b_binder<T, R>(
&mut self,
t: &Binder<T>,
f: impl FnOnce(&mut Self, &T) -> R,
) -> R
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
fn adjust_bvars<T: TypeFoldable + Clone + Debug>(&self, t: &T) -> T
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> 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