Trait rustc_middle::ty::visit::TypeVisitor
source · pub trait TypeVisitor<'tcx>: Sized {
type BreakTy = !;
fn visit_binder<T: TypeVisitable<'tcx>>(
&mut self,
t: &Binder<'tcx, T>
) -> ControlFlow<Self::BreakTy> { ... }
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> { ... }
fn visit_region(&mut self, r: Region<'tcx>) -> ControlFlow<Self::BreakTy> { ... }
fn visit_const(&mut self, c: Const<'tcx>) -> ControlFlow<Self::BreakTy> { ... }
fn visit_unevaluated(
&mut self,
uv: Unevaluated<'tcx>
) -> ControlFlow<Self::BreakTy> { ... }
fn visit_predicate(
&mut self,
p: Predicate<'tcx>
) -> ControlFlow<Self::BreakTy> { ... }
fn visit_mir_const(
&mut self,
c: ConstantKind<'tcx>
) -> ControlFlow<Self::BreakTy> { ... }
}
Expand description
This trait is implemented for every visiting traversal. There is a visit method defined for every type of interest. Each such method has a default that recurses into the type’s fields in a non-custom fashion.
Provided Associated Types
Provided Methods
sourcefn visit_binder<T: TypeVisitable<'tcx>>(
fn visit_binder<T: TypeVisitable<'tcx>>(
&mut self,
t: &Binder<'tcx, T>
) -> ControlFlow<Self::BreakTy>
source
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy>
source
fn visit_region(&mut self, r: Region<'tcx>) -> ControlFlow<Self::BreakTy>
source
fn visit_const(&mut self, c: Const<'tcx>) -> ControlFlow<Self::BreakTy>
sourcefn visit_unevaluated(
fn visit_unevaluated(
&mut self,
uv: Unevaluated<'tcx>
) -> ControlFlow<Self::BreakTy>
source
fn visit_predicate(&mut self, p: Predicate<'tcx>) -> ControlFlow<Self::BreakTy>
sourcefn visit_mir_const(