pub type InEnvironment<T> = InEnvironment<T>;
Aliased Type§
struct InEnvironment<T> {
pub environment: Environment<<T as HasInterner>::Interner>,
pub goal: T,
}
Fields§
§environment: Environment<<T as HasInterner>::Interner>
§goal: T
Implementations
Trait Implementations
§impl<T, U, I> CastTo<InEnvironment<U>> for InEnvironment<T>where
T: HasInterner<Interner = I> + CastTo<U>,
U: HasInterner<Interner = I>,
I: Interner,
impl<T, U, I> CastTo<InEnvironment<U>> for InEnvironment<T>where
T: HasInterner<Interner = I> + CastTo<U>,
U: HasInterner<Interner = I>,
I: Interner,
§impl<G> HasInterner for InEnvironment<G>where
G: HasInterner,
impl<G> HasInterner for InEnvironment<G>where
G: HasInterner,
§impl<G, _I> TypeFoldable<_I> for InEnvironment<G>where
G: HasInterner<Interner = _I> + HasInterner + TypeFoldable<_I>,
_I: Interner,
impl<G, _I> TypeFoldable<_I> for InEnvironment<G>where
G: HasInterner<Interner = _I> + HasInterner + TypeFoldable<_I>,
_I: Interner,
§fn try_fold_with<E>(
self,
folder: &mut dyn FallibleTypeFolder<_I, Error = E>,
outer_binder: DebruijnIndex,
) -> Result<InEnvironment<G>, E>
fn try_fold_with<E>( self, folder: &mut dyn FallibleTypeFolder<_I, Error = E>, outer_binder: DebruijnIndex, ) -> Result<InEnvironment<G>, E>
Apply the given folder
folder
to self
; binders
is the
number of binders that are in scope when beginning the
folder. Typically binders
starts as 0, but is adjusted when
we encounter Binders<T>
in the IR or other similar
constructs.§fn fold_with(
self,
folder: &mut dyn TypeFolder<I, Error = Infallible>,
outer_binder: DebruijnIndex,
) -> Self
fn fold_with( self, folder: &mut dyn TypeFolder<I, Error = Infallible>, outer_binder: DebruijnIndex, ) -> Self
A convenient alternative to
try_fold_with
for use with infallible
folders. Do not override this method, to ensure coherence with
try_fold_with
.§impl<G, _I> TypeVisitable<_I> for InEnvironment<G>where
G: HasInterner<Interner = _I> + HasInterner + TypeVisitable<_I>,
_I: Interner,
impl<G, _I> TypeVisitable<_I> for InEnvironment<G>where
G: HasInterner<Interner = _I> + HasInterner + TypeVisitable<_I>,
_I: Interner,
§fn visit_with<B>(
&self,
visitor: &mut dyn TypeVisitor<_I, BreakTy = B>,
outer_binder: DebruijnIndex,
) -> ControlFlow<B>
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<_I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
Apply the given visitor
visitor
to self
; binders
is the
number of binders that are in scope when beginning the
visitor. Typically binders
starts as 0, but is adjusted when
we encounter Binders<T>
in the IR or other similar
constructs.