Trait hir_ty::TypeVisitable
pub trait TypeVisitable<I>: Debugwhere
I: Interner,{
// Required method
fn visit_with<B>(
&self,
visitor: &mut dyn TypeVisitor<I, BreakTy = B>,
outer_binder: DebruijnIndex,
) -> ControlFlow<B>;
}
Expand description
Applies the given visitor
to a value, producing a visited result
of type TypeVisitor::Result
.
Required Methods§
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.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
§impl<A, B, C, D, E, I> TypeVisitable<I> for (A, B, C, D, E)where
A: TypeVisitable<I>,
B: TypeVisitable<I>,
C: TypeVisitable<I>,
D: TypeVisitable<I>,
E: TypeVisitable<I>,
I: Interner,
impl<A, B, C, D, E, I> TypeVisitable<I> for (A, B, C, D, E)where
A: TypeVisitable<I>,
B: TypeVisitable<I>,
C: TypeVisitable<I>,
D: TypeVisitable<I>,
E: TypeVisitable<I>,
I: Interner,
fn visit_with<BT>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = BT>, outer_binder: DebruijnIndex, ) -> ControlFlow<BT>
§impl<A, B, C, D, I> TypeVisitable<I> for (A, B, C, D)where
A: TypeVisitable<I>,
B: TypeVisitable<I>,
C: TypeVisitable<I>,
D: TypeVisitable<I>,
I: Interner,
impl<A, B, C, D, I> TypeVisitable<I> for (A, B, C, D)where
A: TypeVisitable<I>,
B: TypeVisitable<I>,
C: TypeVisitable<I>,
D: TypeVisitable<I>,
I: Interner,
fn visit_with<BT>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = BT>, outer_binder: DebruijnIndex, ) -> ControlFlow<BT>
§impl<A, B, C, I> TypeVisitable<I> for (A, B, C)
impl<A, B, C, I> TypeVisitable<I> for (A, B, C)
fn visit_with<BT>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = BT>, outer_binder: DebruijnIndex, ) -> ControlFlow<BT>
§impl<A, B, I> TypeVisitable<I> for (A, B)where
A: TypeVisitable<I>,
B: TypeVisitable<I>,
I: Interner,
impl<A, B, I> TypeVisitable<I> for (A, B)where
A: TypeVisitable<I>,
B: TypeVisitable<I>,
I: Interner,
fn visit_with<BT>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = BT>, outer_binder: DebruijnIndex, ) -> ControlFlow<BT>
§impl<I> TypeVisitable<I> for boolwhere
I: Interner,
impl<I> TypeVisitable<I> for boolwhere
I: Interner,
fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for ()where
I: Interner,
impl<I> TypeVisitable<I> for ()where
I: Interner,
fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for usizewhere
I: Interner,
impl<I> TypeVisitable<I> for usizewhere
I: Interner,
fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for PhantomData<I>where
I: Interner,
impl<I> TypeVisitable<I> for PhantomData<I>where
I: Interner,
fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for AdtDatum<I>where
I: Interner,
impl<I> TypeVisitable<I> for AdtDatum<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for AdtDatumBound<I>where
I: Interner,
impl<I> TypeVisitable<I> for AdtDatumBound<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for AdtFlagswhere
I: Interner,
impl<I> TypeVisitable<I> for AdtFlagswhere
I: Interner,
fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for AdtKindwhere
I: Interner,
impl<I> TypeVisitable<I> for AdtKindwhere
I: Interner,
fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for AdtVariantDatum<I>where
I: Interner,
impl<I> TypeVisitable<I> for AdtVariantDatum<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for AliasEqBound<I>where
I: Interner,
impl<I> TypeVisitable<I> for AliasEqBound<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for AssociatedTyDatum<I>where
I: Interner,
impl<I> TypeVisitable<I> for AssociatedTyDatum<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for AssociatedTyDatumBound<I>where
I: Interner,
impl<I> TypeVisitable<I> for AssociatedTyDatumBound<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for AssociatedTyValue<I>where
I: Interner,
impl<I> TypeVisitable<I> for AssociatedTyValue<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for AssociatedTyValueBound<I>where
I: Interner,
impl<I> TypeVisitable<I> for AssociatedTyValueBound<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for AssociatedTyValueId<I>where
I: Interner,
impl<I> TypeVisitable<I> for AssociatedTyValueId<I>where
I: Interner,
fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for FnDefDatum<I>where
I: Interner,
impl<I> TypeVisitable<I> for FnDefDatum<I>where
I: Interner,
Avoids visiting I::FnAbi
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for FnDefDatumBound<I>where
I: Interner,
impl<I> TypeVisitable<I> for FnDefDatumBound<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for FnDefInputsAndOutputDatum<I>where
I: Interner,
impl<I> TypeVisitable<I> for FnDefInputsAndOutputDatum<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for ImplDatum<I>where
I: Interner,
impl<I> TypeVisitable<I> for ImplDatum<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for ImplDatumBound<I>where
I: Interner,
impl<I> TypeVisitable<I> for ImplDatumBound<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for ImplTypewhere
I: Interner,
impl<I> TypeVisitable<I> for ImplTypewhere
I: Interner,
fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for InlineBound<I>where
I: Interner,
impl<I> TypeVisitable<I> for InlineBound<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for OpaqueTyDatum<I>where
I: Interner,
impl<I> TypeVisitable<I> for OpaqueTyDatum<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for OpaqueTyDatumBound<I>where
I: Interner,
impl<I> TypeVisitable<I> for OpaqueTyDatumBound<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for Polaritywhere
I: Interner,
impl<I> TypeVisitable<I> for Polaritywhere
I: Interner,
fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for TraitBound<I>where
I: Interner,
impl<I> TypeVisitable<I> for TraitBound<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for TraitDatum<I>where
I: Interner,
impl<I> TypeVisitable<I> for TraitDatum<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for TraitDatumBound<I>where
I: Interner,
impl<I> TypeVisitable<I> for TraitDatumBound<I>where
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for TraitFlagswhere
I: Interner,
impl<I> TypeVisitable<I> for TraitFlagswhere
I: Interner,
fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<I> TypeVisitable<I> for WellKnownTraitwhere
I: Interner,
impl<I> TypeVisitable<I> for WellKnownTraitwhere
I: Interner,
fn visit_with<B>( &self, _visitor: &mut dyn TypeVisitor<I, BreakTy = B>, _outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<T, I> TypeVisitable<I> for &[T]where
T: TypeVisitable<I>,
I: Interner,
impl<T, I> TypeVisitable<I> for &[T]where
T: TypeVisitable<I>,
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<T, I> TypeVisitable<I> for Option<T>where
T: TypeVisitable<I>,
I: Interner,
impl<T, I> TypeVisitable<I> for Option<T>where
T: TypeVisitable<I>,
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<T, I> TypeVisitable<I> for &Twhere
T: TypeVisitable<I>,
I: Interner,
impl<T, I> TypeVisitable<I> for &Twhere
T: TypeVisitable<I>,
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<T, I> TypeVisitable<I> for Box<T>where
T: TypeVisitable<I>,
I: Interner,
impl<T, I> TypeVisitable<I> for Box<T>where
T: TypeVisitable<I>,
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<T, I> TypeVisitable<I> for Arc<T>where
T: TypeVisitable<I>,
I: Interner,
impl<T, I> TypeVisitable<I> for Arc<T>where
T: TypeVisitable<I>,
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
§impl<T, I> TypeVisitable<I> for Vec<T>where
T: TypeVisitable<I>,
I: Interner,
impl<T, I> TypeVisitable<I> for Vec<T>where
T: TypeVisitable<I>,
I: Interner,
fn visit_with<B>( &self, visitor: &mut dyn TypeVisitor<I, BreakTy = B>, outer_binder: DebruijnIndex, ) -> ControlFlow<B>
Implementors§
impl<G, _I> TypeVisitable<_I> for InEnvironment<G>where
G: HasInterner<Interner = _I> + HasInterner + TypeVisitable<_I>,
_I: Interner,
impl<I> TypeVisitable<I> for Mutabilitywhere
I: Interner,
impl<I> TypeVisitable<I> for Safetywhere
I: Interner,
impl<I> TypeVisitable<I> for Scalarwhere
I: Interner,
impl<I> TypeVisitable<I> for FloatTywhere
I: Interner,
impl<I> TypeVisitable<I> for IntTywhere
I: Interner,
impl<I> TypeVisitable<I> for UintTywhere
I: Interner,
impl<I> TypeVisitable<I> for AdtId<I>where
I: Interner,
impl<I> TypeVisitable<I> for DebruijnIndexwhere
I: Interner,
impl<I> TypeVisitable<I> for FnSubst<I>where
I: Interner,
impl<I> TypeVisitable<I> for AliasEq<I>where
I: Interner,
impl<I> TypeVisitable<I> for AliasTy<I>where
I: Interner,
impl<I> TypeVisitable<I> for AnswerSubst<I>where
I: Interner,
impl<I> TypeVisitable<I> for AssocTypeId<I>where
I: Interner,
impl<I> TypeVisitable<I> for ClausePrioritywhere
I: Interner,
impl<I> TypeVisitable<I> for ClosureId<I>where
I: Interner,
impl<I> TypeVisitable<I> for Const<I>where
I: Interner,
impl<I> TypeVisitable<I> for ConstrainedSubst<I>where
I: Interner,
impl<I> TypeVisitable<I> for Constraint<I>where
I: Interner,
impl<I> TypeVisitable<I> for Constraints<I>where
I: Interner,
impl<I> TypeVisitable<I> for CoroutineId<I>where
I: Interner,
impl<I> TypeVisitable<I> for DomainGoal<I>where
I: Interner,
impl<I> TypeVisitable<I> for DynTy<I>where
I: Interner,
impl<I> TypeVisitable<I> for Environment<I>where
I: Interner,
impl<I> TypeVisitable<I> for EqGoal<I>where
I: Interner,
impl<I> TypeVisitable<I> for FnDefId<I>where
I: Interner,
impl<I> TypeVisitable<I> for FnPointer<I>where
I: Interner,
impl<I> TypeVisitable<I> for ForeignDefId<I>where
I: Interner,
impl<I> TypeVisitable<I> for FromEnv<I>where
I: Interner,
impl<I> TypeVisitable<I> for GenericArg<I>where
I: Interner,
impl<I> TypeVisitable<I> for GenericArgData<I>where
I: Interner,
impl<I> TypeVisitable<I> for Goal<I>where
I: Interner,
impl<I> TypeVisitable<I> for GoalData<I>where
I: Interner,
impl<I> TypeVisitable<I> for Goals<I>where
I: Interner,
impl<I> TypeVisitable<I> for ImplId<I>where
I: Interner,
impl<I> TypeVisitable<I> for Lifetime<I>where
I: Interner,
impl<I> TypeVisitable<I> for LifetimeOutlives<I>where
I: Interner,
impl<I> TypeVisitable<I> for Normalize<I>where
I: Interner,
impl<I> TypeVisitable<I> for OpaqueTy<I>where
I: Interner,
impl<I> TypeVisitable<I> for OpaqueTyId<I>where
I: Interner,
impl<I> TypeVisitable<I> for PlaceholderIndexwhere
I: Interner,
impl<I> TypeVisitable<I> for ProgramClause<I>where
I: Interner,
impl<I> TypeVisitable<I> for ProgramClauseImplication<I>where
I: Interner,
impl<I> TypeVisitable<I> for ProgramClauses<I>where
I: Interner,
impl<I> TypeVisitable<I> for ProjectionTy<I>where
I: Interner,
impl<I> TypeVisitable<I> for QuantifiedWhereClauses<I>where
I: Interner,
impl<I> TypeVisitable<I> for QuantifierKindwhere
I: Interner,
impl<I> TypeVisitable<I> for Substitution<I>where
I: Interner,
impl<I> TypeVisitable<I> for SubtypeGoal<I>where
I: Interner,
impl<I> TypeVisitable<I> for TraitId<I>where
I: Interner,
impl<I> TypeVisitable<I> for TraitRef<I>where
I: Interner,
impl<I> TypeVisitable<I> for Ty<I>where
I: Interner,
“visiting” a type invokes the visit_ty
method on the visitor; this
usually (in turn) invokes super_visit_ty
to visit the individual
parts.