pub struct WKVarSubst {
pub subst_instantiations: UnordMap<WKVid, Vec<Expr>>,
pub wkvar_instantiations: UnordMap<WKVid, Binder<Expr>>,
pub keep_wkvars: bool,
}Fields§
§subst_instantiations: UnordMap<WKVid, Vec<Expr>>A map from wkvid to each of the substitutions we made for it in whatever we folded over.
In theory there should only ever be one value in this map.
wkvar_instantiations: UnordMap<WKVid, Binder<Expr>>§keep_wkvars: boolKeep wkvars after substituting
Implementations§
Trait Implementations§
Source§impl TypeFolder for WKVarSubst
impl TypeFolder for WKVarSubst
fn fold_expr(&mut self, e: &Expr) -> Expr
fn enter_binder(&mut self, _vars: &Interned<[BoundVariableKind]>)
fn exit_binder(&mut self)
fn fold_sort(&mut self, sort: &Sort) -> Sort
fn fold_ty(&mut self, ty: &Ty) -> Ty
fn fold_bty(&mut self, bty: &BaseTy) -> BaseTy
fn fold_subset_ty(&mut self, constr: &SubsetTy) -> SubsetTy
fn fold_region(&mut self, re: &Region) -> Region
fn fold_const(&mut self, c: &Const) -> Const
Auto Trait Implementations§
impl Freeze for WKVarSubst
impl RefUnwindSafe for WKVarSubst
impl Send for WKVarSubst
impl Sync for WKVarSubst
impl Unpin for WKVarSubst
impl UnwindSafe for WKVarSubst
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<F> FallibleTypeFolder for Fwhere
F: TypeFolder,
impl<F> FallibleTypeFolder for Fwhere
F: TypeFolder,
type Error = !
fn try_enter_binder(&mut self, vars: &Interned<[BoundVariableKind]>)
fn try_exit_binder(&mut self)
fn try_fold_sort( &mut self, sort: &Sort, ) -> Result<Sort, <F as FallibleTypeFolder>::Error>
fn try_fold_ty( &mut self, ty: &Ty, ) -> Result<Ty, <F as FallibleTypeFolder>::Error>
fn try_fold_bty( &mut self, bty: &BaseTy, ) -> Result<BaseTy, <F as FallibleTypeFolder>::Error>
fn try_fold_subset_ty( &mut self, ty: &SubsetTy, ) -> Result<SubsetTy, <F as FallibleTypeFolder>::Error>
fn try_fold_region( &mut self, re: &Region, ) -> Result<Region, <F as FallibleTypeFolder>::Error>
fn try_fold_const( &mut self, c: &Const, ) -> Result<Const, <F as FallibleTypeFolder>::Error>
fn try_fold_expr( &mut self, expr: &Expr, ) -> Result<Expr, <F as FallibleTypeFolder>::Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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