5//!
6//! Note: it is an important invariant that the default visitor walks the body
7▶//! of a function in "execution order" (more concretely, reverse post-order
8//! with respect to the CFG implied by the AST), meaning that if AST node A may
9//! execute before AST node B, then A is visited first. The borrow checker in
· · ·
762
763 // This is only used by the MutVisitor. We include this symmetry here to make writing other
764▶ // functions easier.
765 $(${ignore($lt)}
766 #[expect(unused, rustc::disallowed_pass_by_ref)]
· · ·
821 ) -> V::Result {
822 match self {
823▶ ItemKind::Fn(func) => {
824 let kind = FnKind::Fn(FnCtxt::Free, visibility, &$($mut)? *func);
825 try_visit!(vis.visit_fn(kind, attrs, span, id));
· · ·
824▶ let kind = FnKind::Fn(FnCtxt::Free, visibility, &$($mut)? *func);
825 try_visit!(vis.visit_fn(kind, attrs, span, id));
826 }
· · ·
883 AssocItemKind::Const(item) =>
884 visit_visitable!($($mut)? vis, item),
885▶ AssocItemKind::Fn(func) => {
886 let kind = FnKind::Fn(FnCtxt::Assoc(ctxt), visibility, &$($mut)? *func);
887 try_visit!(vis.visit_fn(kind, attrs, span, id))
+ 5 more matches in this file