struct ProductEtaExpander<'a> {
current_path: Expr,
expr_to_eta_expansion: &'a mut UnordMap<Expr, Expr>,
}Fields§
§current_path: Expr§expr_to_eta_expansion: &'a mut UnordMap<Expr, Expr>Implementations§
Source§impl<'a> ProductEtaExpander<'a>
Recursively “unpacks” a product by eta-expanding each part of it.
Maps each part of the product to its eta-expanded path.
impl<'a> ProductEtaExpander<'a>
Recursively “unpacks” a product by eta-expanding each part of it. Maps each part of the product to its eta-expanded path.
e.g.
in = {
current_path: self,
expr: TwoFields { 0: (a0.0, a0.1), 1: 42 })
}
out =
a0.0 => self.0.0
a0.1 => self.0.1
42 => self.1Trait Implementations§
Source§impl TypeVisitor for ProductEtaExpander<'_>
impl TypeVisitor for ProductEtaExpander<'_>
fn visit_expr(&mut self, expr: &Expr) -> ControlFlow<Self::BreakTy>
type BreakTy = !
fn enter_binder(&mut self, _vars: &Interned<[BoundVariableKind]>)
fn exit_binder(&mut self)
fn visit_sort(&mut self, sort: &Sort) -> ControlFlow<Self::BreakTy>
fn visit_ty(&mut self, ty: &Ty) -> ControlFlow<Self::BreakTy>
fn visit_bty(&mut self, bty: &BaseTy) -> ControlFlow<Self::BreakTy>
Auto Trait Implementations§
impl<'a> Freeze for ProductEtaExpander<'a>
impl<'a> RefUnwindSafe for ProductEtaExpander<'a>
impl<'a> Send for ProductEtaExpander<'a>
impl<'a> Sync for ProductEtaExpander<'a>
impl<'a> Unpin for ProductEtaExpander<'a>
impl<'a> !UnwindSafe for ProductEtaExpander<'a>
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
§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