Trait VisitAst

Source
pub trait VisitAst: Visitor + Sized {
Show 130 methods // Provided methods fn visit<'a, T: AstVisitable>( &'a mut self, x: &T, ) -> ControlFlow<Self::Break> { ... } fn visit_by_val<T: AstVisitable>( self, x: &T, ) -> ControlFlow<Self::Break, Self> { ... } fn visit_by_val_infallible<T: AstVisitable>(self, x: &T) -> Self where Self: Visitor<Break = Infallible> + Sized { ... } fn visit_inner<T>(&mut self, x: &T) -> ControlFlow<Self::Break> where T: for<'s> Drive<'s, AstVisitableWrapper<Self>> { ... } fn visit_de_bruijn_id(&mut self, x: &DeBruijnId) -> ControlFlow<Self::Break> { ... } fn enter_de_bruijn_id(&mut self, x: &DeBruijnId) { ... } fn exit_de_bruijn_id(&mut self, x: &DeBruijnId) { ... } fn visit_ty(&mut self, x: &Ty) -> ControlFlow<Self::Break> { ... } fn enter_ty(&mut self, x: &Ty) { ... } fn exit_ty(&mut self, x: &Ty) { ... } fn visit_ty_kind(&mut self, x: &TyKind) -> ControlFlow<Self::Break> { ... } fn enter_ty_kind(&mut self, x: &TyKind) { ... } fn exit_ty_kind(&mut self, x: &TyKind) { ... } fn visit_region(&mut self, x: &Region) -> ControlFlow<Self::Break> { ... } fn enter_region(&mut self, x: &Region) { ... } fn exit_region(&mut self, x: &Region) { ... } fn visit_const_generic( &mut self, x: &ConstGeneric, ) -> ControlFlow<Self::Break> { ... } fn enter_const_generic(&mut self, x: &ConstGeneric) { ... } fn exit_const_generic(&mut self, x: &ConstGeneric) { ... } fn visit_trait_ref(&mut self, x: &TraitRef) -> ControlFlow<Self::Break> { ... } fn enter_trait_ref(&mut self, x: &TraitRef) { ... } fn exit_trait_ref(&mut self, x: &TraitRef) { ... } fn visit_trait_ref_kind( &mut self, x: &TraitRefKind, ) -> ControlFlow<Self::Break> { ... } fn enter_trait_ref_kind(&mut self, x: &TraitRefKind) { ... } fn exit_trait_ref_kind(&mut self, x: &TraitRefKind) { ... } fn visit_type_decl_ref( &mut self, x: &TypeDeclRef, ) -> ControlFlow<Self::Break> { ... } fn enter_type_decl_ref(&mut self, x: &TypeDeclRef) { ... } fn exit_type_decl_ref(&mut self, x: &TypeDeclRef) { ... } fn visit_fun_decl_ref(&mut self, x: &FunDeclRef) -> ControlFlow<Self::Break> { ... } fn enter_fun_decl_ref(&mut self, x: &FunDeclRef) { ... } fn exit_fun_decl_ref(&mut self, x: &FunDeclRef) { ... } fn visit_maybe_builtin_fun_decl_ref( &mut self, x: &MaybeBuiltinFunDeclRef, ) -> ControlFlow<Self::Break> { ... } fn enter_maybe_builtin_fun_decl_ref(&mut self, x: &MaybeBuiltinFunDeclRef) { ... } fn exit_maybe_builtin_fun_decl_ref(&mut self, x: &MaybeBuiltinFunDeclRef) { ... } fn visit_trait_method_ref( &mut self, x: &TraitMethodRef, ) -> ControlFlow<Self::Break> { ... } fn enter_trait_method_ref(&mut self, x: &TraitMethodRef) { ... } fn exit_trait_method_ref(&mut self, x: &TraitMethodRef) { ... } fn visit_global_decl_ref( &mut self, x: &GlobalDeclRef, ) -> ControlFlow<Self::Break> { ... } fn enter_global_decl_ref(&mut self, x: &GlobalDeclRef) { ... } fn exit_global_decl_ref(&mut self, x: &GlobalDeclRef) { ... } fn visit_trait_decl_ref( &mut self, x: &TraitDeclRef, ) -> ControlFlow<Self::Break> { ... } fn enter_trait_decl_ref(&mut self, x: &TraitDeclRef) { ... } fn exit_trait_decl_ref(&mut self, x: &TraitDeclRef) { ... } fn visit_trait_impl_ref( &mut self, x: &TraitImplRef, ) -> ControlFlow<Self::Break> { ... } fn enter_trait_impl_ref(&mut self, x: &TraitImplRef) { ... } fn exit_trait_impl_ref(&mut self, x: &TraitImplRef) { ... } fn visit_generic_args( &mut self, x: &GenericArgs, ) -> ControlFlow<Self::Break> { ... } fn enter_generic_args(&mut self, x: &GenericArgs) { ... } fn exit_generic_args(&mut self, x: &GenericArgs) { ... } fn visit_generic_params( &mut self, x: &GenericParams, ) -> ControlFlow<Self::Break> { ... } fn enter_generic_params(&mut self, x: &GenericParams) { ... } fn exit_generic_params(&mut self, x: &GenericParams) { ... } fn visit_trait_clause( &mut self, x: &TraitClause, ) -> ControlFlow<Self::Break> { ... } fn enter_trait_clause(&mut self, x: &TraitClause) { ... } fn exit_trait_clause(&mut self, x: &TraitClause) { ... } fn visit_trait_clause_id( &mut self, x: &TraitClauseId, ) -> ControlFlow<Self::Break> { ... } fn enter_trait_clause_id(&mut self, x: &TraitClauseId) { ... } fn exit_trait_clause_id(&mut self, x: &TraitClauseId) { ... } fn visit_trait_type_constraint( &mut self, x: &TraitTypeConstraint, ) -> ControlFlow<Self::Break> { ... } fn enter_trait_type_constraint(&mut self, x: &TraitTypeConstraint) { ... } fn exit_trait_type_constraint(&mut self, x: &TraitTypeConstraint) { ... } fn visit_place(&mut self, x: &Place) -> ControlFlow<Self::Break> { ... } fn enter_place(&mut self, x: &Place) { ... } fn exit_place(&mut self, x: &Place) { ... } fn visit_rvalue(&mut self, x: &Rvalue) -> ControlFlow<Self::Break> { ... } fn enter_rvalue(&mut self, x: &Rvalue) { ... } fn exit_rvalue(&mut self, x: &Rvalue) { ... } fn visit_de_bruijn_var<T: AstVisitable + Idx>( &mut self, x: &DeBruijnVar<T>, ) -> ControlFlow<Self::Break> { ... } fn enter_de_bruijn_var<T: AstVisitable + Idx>(&mut self, x: &DeBruijnVar<T>) { ... } fn exit_de_bruijn_var<T: AstVisitable + Idx>(&mut self, x: &DeBruijnVar<T>) { ... } fn visit_region_binder<T: AstVisitable>( &mut self, x: &RegionBinder<T>, ) -> ControlFlow<Self::Break> { ... } fn enter_region_binder<T: AstVisitable>(&mut self, x: &RegionBinder<T>) { ... } fn exit_region_binder<T: AstVisitable>(&mut self, x: &RegionBinder<T>) { ... } fn visit_binder<T: AstVisitable>( &mut self, x: &Binder<T>, ) -> ControlFlow<Self::Break> { ... } fn enter_binder<T: AstVisitable>(&mut self, x: &Binder<T>) { ... } fn exit_binder<T: AstVisitable>(&mut self, x: &Binder<T>) { ... } fn visit_llbc_statement( &mut self, x: &Statement, ) -> ControlFlow<Self::Break> { ... } fn enter_llbc_statement(&mut self, x: &Statement) { ... } fn exit_llbc_statement(&mut self, x: &Statement) { ... } fn visit_ullbc_statement( &mut self, x: &Statement, ) -> ControlFlow<Self::Break> { ... } fn enter_ullbc_statement(&mut self, x: &Statement) { ... } fn exit_ullbc_statement(&mut self, x: &Statement) { ... } fn visit_aggregate_kind( &mut self, x: &AggregateKind, ) -> ControlFlow<Self::Break> { ... } fn enter_aggregate_kind(&mut self, x: &AggregateKind) { ... } fn exit_aggregate_kind(&mut self, x: &AggregateKind) { ... } fn visit_fn_ptr(&mut self, x: &FnPtr) -> ControlFlow<Self::Break> { ... } fn enter_fn_ptr(&mut self, x: &FnPtr) { ... } fn exit_fn_ptr(&mut self, x: &FnPtr) { ... } fn visit_item_kind(&mut self, x: &ItemKind) -> ControlFlow<Self::Break> { ... } fn enter_item_kind(&mut self, x: &ItemKind) { ... } fn exit_item_kind(&mut self, x: &ItemKind) { ... } fn visit_item_meta(&mut self, x: &ItemMeta) -> ControlFlow<Self::Break> { ... } fn enter_item_meta(&mut self, x: &ItemMeta) { ... } fn exit_item_meta(&mut self, x: &ItemMeta) { ... } fn visit_span(&mut self, x: &Span) -> ControlFlow<Self::Break> { ... } fn enter_span(&mut self, x: &Span) { ... } fn exit_span(&mut self, x: &Span) { ... } fn visit_constant_expr( &mut self, x: &ConstantExpr, ) -> ControlFlow<Self::Break> { ... } fn enter_constant_expr(&mut self, x: &ConstantExpr) { ... } fn exit_constant_expr(&mut self, x: &ConstantExpr) { ... } fn visit_fun_decl_id(&mut self, x: &FunDeclId) -> ControlFlow<Self::Break> { ... } fn enter_fun_decl_id(&mut self, x: &FunDeclId) { ... } fn exit_fun_decl_id(&mut self, x: &FunDeclId) { ... } fn visit_global_decl_id( &mut self, x: &GlobalDeclId, ) -> ControlFlow<Self::Break> { ... } fn enter_global_decl_id(&mut self, x: &GlobalDeclId) { ... } fn exit_global_decl_id(&mut self, x: &GlobalDeclId) { ... } fn visit_type_decl_id(&mut self, x: &TypeDeclId) -> ControlFlow<Self::Break> { ... } fn enter_type_decl_id(&mut self, x: &TypeDeclId) { ... } fn exit_type_decl_id(&mut self, x: &TypeDeclId) { ... } fn visit_trait_decl_id( &mut self, x: &TraitDeclId, ) -> ControlFlow<Self::Break> { ... } fn enter_trait_decl_id(&mut self, x: &TraitDeclId) { ... } fn exit_trait_decl_id(&mut self, x: &TraitDeclId) { ... } fn visit_trait_impl_id( &mut self, x: &TraitImplId, ) -> ControlFlow<Self::Break> { ... } fn enter_trait_impl_id(&mut self, x: &TraitImplId) { ... } fn exit_trait_impl_id(&mut self, x: &TraitImplId) { ... } fn visit_fun_decl(&mut self, x: &FunDecl) -> ControlFlow<Self::Break> { ... } fn enter_fun_decl(&mut self, x: &FunDecl) { ... } fn exit_fun_decl(&mut self, x: &FunDecl) { ... } fn visit_global_decl(&mut self, x: &GlobalDecl) -> ControlFlow<Self::Break> { ... } fn enter_global_decl(&mut self, x: &GlobalDecl) { ... } fn exit_global_decl(&mut self, x: &GlobalDecl) { ... } fn visit_type_decl(&mut self, x: &TypeDecl) -> ControlFlow<Self::Break> { ... } fn enter_type_decl(&mut self, x: &TypeDecl) { ... } fn exit_type_decl(&mut self, x: &TypeDecl) { ... } fn visit_trait_decl(&mut self, x: &TraitDecl) -> ControlFlow<Self::Break> { ... } fn enter_trait_decl(&mut self, x: &TraitDecl) { ... } fn exit_trait_decl(&mut self, x: &TraitDecl) { ... } fn visit_trait_impl(&mut self, x: &TraitImpl) -> ControlFlow<Self::Break> { ... } fn enter_trait_impl(&mut self, x: &TraitImpl) { ... } fn exit_trait_impl(&mut self, x: &TraitImpl) { ... }
}

Provided Methods§

Source

fn visit<'a, T: AstVisitable>(&'a mut self, x: &T) -> ControlFlow<Self::Break>

Visit a visitable type. This calls the appropriate method of this trait on x (visit_$ty if it exists, visit_inner if not).

Source

fn visit_by_val<T: AstVisitable>(self, x: &T) -> ControlFlow<Self::Break, Self>

Convenience alias for method chaining.

Source

fn visit_by_val_infallible<T: AstVisitable>(self, x: &T) -> Self
where Self: Visitor<Break = Infallible> + Sized,

Convenience when the visitor does not return early.

Source

fn visit_inner<T>(&mut self, x: &T) -> ControlFlow<Self::Break>
where T: for<'s> Drive<'s, AstVisitableWrapper<Self>>,

Visit the contents of x. This calls self.visit() on each field of T. This is available for any type whose contents are all #trait_name.

Source

fn visit_de_bruijn_id(&mut self, x: &DeBruijnId) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_de_bruijn_id(&mut self, x: &DeBruijnId)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_de_bruijn_id(&mut self, x: &DeBruijnId)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_ty(&mut self, x: &Ty) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_ty(&mut self, x: &Ty)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_ty(&mut self, x: &Ty)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_ty_kind(&mut self, x: &TyKind) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_ty_kind(&mut self, x: &TyKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_ty_kind(&mut self, x: &TyKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_region(&mut self, x: &Region) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_region(&mut self, x: &Region)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_region(&mut self, x: &Region)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_const_generic(&mut self, x: &ConstGeneric) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_const_generic(&mut self, x: &ConstGeneric)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_const_generic(&mut self, x: &ConstGeneric)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_trait_ref(&mut self, x: &TraitRef) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_trait_ref(&mut self, x: &TraitRef)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_trait_ref(&mut self, x: &TraitRef)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_trait_ref_kind(&mut self, x: &TraitRefKind) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_trait_ref_kind(&mut self, x: &TraitRefKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_trait_ref_kind(&mut self, x: &TraitRefKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_type_decl_ref(&mut self, x: &TypeDeclRef) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_type_decl_ref(&mut self, x: &TypeDeclRef)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_type_decl_ref(&mut self, x: &TypeDeclRef)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_fun_decl_ref(&mut self, x: &FunDeclRef) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_fun_decl_ref(&mut self, x: &FunDeclRef)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_fun_decl_ref(&mut self, x: &FunDeclRef)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_maybe_builtin_fun_decl_ref( &mut self, x: &MaybeBuiltinFunDeclRef, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_maybe_builtin_fun_decl_ref(&mut self, x: &MaybeBuiltinFunDeclRef)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_maybe_builtin_fun_decl_ref(&mut self, x: &MaybeBuiltinFunDeclRef)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_trait_method_ref( &mut self, x: &TraitMethodRef, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_trait_method_ref(&mut self, x: &TraitMethodRef)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_trait_method_ref(&mut self, x: &TraitMethodRef)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_global_decl_ref( &mut self, x: &GlobalDeclRef, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_global_decl_ref(&mut self, x: &GlobalDeclRef)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_global_decl_ref(&mut self, x: &GlobalDeclRef)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_trait_decl_ref(&mut self, x: &TraitDeclRef) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_trait_decl_ref(&mut self, x: &TraitDeclRef)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_trait_decl_ref(&mut self, x: &TraitDeclRef)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_trait_impl_ref(&mut self, x: &TraitImplRef) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_trait_impl_ref(&mut self, x: &TraitImplRef)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_trait_impl_ref(&mut self, x: &TraitImplRef)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_generic_args(&mut self, x: &GenericArgs) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_generic_args(&mut self, x: &GenericArgs)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_generic_args(&mut self, x: &GenericArgs)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_generic_params( &mut self, x: &GenericParams, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_generic_params(&mut self, x: &GenericParams)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_generic_params(&mut self, x: &GenericParams)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_trait_clause(&mut self, x: &TraitClause) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_trait_clause(&mut self, x: &TraitClause)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_trait_clause(&mut self, x: &TraitClause)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_trait_clause_id( &mut self, x: &TraitClauseId, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_trait_clause_id(&mut self, x: &TraitClauseId)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_trait_clause_id(&mut self, x: &TraitClauseId)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_trait_type_constraint( &mut self, x: &TraitTypeConstraint, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_trait_type_constraint(&mut self, x: &TraitTypeConstraint)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_trait_type_constraint(&mut self, x: &TraitTypeConstraint)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_place(&mut self, x: &Place) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_place(&mut self, x: &Place)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_place(&mut self, x: &Place)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_rvalue(&mut self, x: &Rvalue) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_rvalue(&mut self, x: &Rvalue)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_rvalue(&mut self, x: &Rvalue)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_de_bruijn_var<T: AstVisitable + Idx>( &mut self, x: &DeBruijnVar<T>, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_de_bruijn_var<T: AstVisitable + Idx>(&mut self, x: &DeBruijnVar<T>)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_de_bruijn_var<T: AstVisitable + Idx>(&mut self, x: &DeBruijnVar<T>)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_region_binder<T: AstVisitable>( &mut self, x: &RegionBinder<T>, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_region_binder<T: AstVisitable>(&mut self, x: &RegionBinder<T>)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_region_binder<T: AstVisitable>(&mut self, x: &RegionBinder<T>)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_binder<T: AstVisitable>( &mut self, x: &Binder<T>, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_binder<T: AstVisitable>(&mut self, x: &Binder<T>)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_binder<T: AstVisitable>(&mut self, x: &Binder<T>)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_llbc_statement(&mut self, x: &Statement) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_llbc_statement(&mut self, x: &Statement)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_llbc_statement(&mut self, x: &Statement)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_ullbc_statement(&mut self, x: &Statement) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_ullbc_statement(&mut self, x: &Statement)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_ullbc_statement(&mut self, x: &Statement)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_aggregate_kind( &mut self, x: &AggregateKind, ) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_aggregate_kind(&mut self, x: &AggregateKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_aggregate_kind(&mut self, x: &AggregateKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_fn_ptr(&mut self, x: &FnPtr) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_fn_ptr(&mut self, x: &FnPtr)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_fn_ptr(&mut self, x: &FnPtr)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_item_kind(&mut self, x: &ItemKind) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_item_kind(&mut self, x: &ItemKind)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_item_kind(&mut self, x: &ItemKind)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_item_meta(&mut self, x: &ItemMeta) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_item_meta(&mut self, x: &ItemMeta)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_item_meta(&mut self, x: &ItemMeta)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_span(&mut self, x: &Span) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_span(&mut self, x: &Span)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_span(&mut self, x: &Span)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_constant_expr(&mut self, x: &ConstantExpr) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_constant_expr(&mut self, x: &ConstantExpr)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_constant_expr(&mut self, x: &ConstantExpr)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_fun_decl_id(&mut self, x: &FunDeclId) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_fun_decl_id(&mut self, x: &FunDeclId)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_fun_decl_id(&mut self, x: &FunDeclId)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_global_decl_id(&mut self, x: &GlobalDeclId) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_global_decl_id(&mut self, x: &GlobalDeclId)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_global_decl_id(&mut self, x: &GlobalDeclId)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_type_decl_id(&mut self, x: &TypeDeclId) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_type_decl_id(&mut self, x: &TypeDeclId)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_type_decl_id(&mut self, x: &TypeDeclId)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_trait_decl_id(&mut self, x: &TraitDeclId) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_trait_decl_id(&mut self, x: &TraitDeclId)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_trait_decl_id(&mut self, x: &TraitDeclId)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_trait_impl_id(&mut self, x: &TraitImplId) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_trait_impl_id(&mut self, x: &TraitImplId)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_trait_impl_id(&mut self, x: &TraitImplId)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_fun_decl(&mut self, x: &FunDecl) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_fun_decl(&mut self, x: &FunDecl)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_fun_decl(&mut self, x: &FunDecl)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_global_decl(&mut self, x: &GlobalDecl) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_global_decl(&mut self, x: &GlobalDecl)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_global_decl(&mut self, x: &GlobalDecl)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_type_decl(&mut self, x: &TypeDecl) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_type_decl(&mut self, x: &TypeDecl)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_type_decl(&mut self, x: &TypeDecl)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_trait_decl(&mut self, x: &TraitDecl) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_trait_decl(&mut self, x: &TraitDecl)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_trait_decl(&mut self, x: &TraitDecl)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Source

fn visit_trait_impl(&mut self, x: &TraitImpl) -> ControlFlow<Self::Break>

Overrideable method called when visiting a $ty. When overriding this method, call self.visit_inner(x) to keep recursively visiting the type, or don’t call it if the contents of x should not be visited.

The default implementation calls enter_$ty then visit_inner then exit_$ty.

Source

fn enter_trait_impl(&mut self, x: &TraitImpl)

Called when starting to visit a $ty (unless visit_$ty is overriden).

Source

fn exit_trait_impl(&mut self, x: &TraitImpl)

Called when finished visiting a $ty (unless visit_$ty is overriden).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl VisitAst for CheckGenericsVisitor<'_>

Source§

impl VisitAst for StorageVisitor

Source§

impl VisitAst for MissingIndexChecker<'_>

Source§

impl VisitAst for UsageVisitor<'_>

Source§

impl VisitAst for UsesClauseVisitor

Visit an item looking for uses of the given clause.

Source§

impl VisitAst for Deps

Source§

impl<F> VisitAst for DynVisitor<F>
where F: FnMut(&dyn Any),