Skip to content

Commit

Permalink
Fix a bunch of sites that were walking instead of visiting, making it…
Browse files Browse the repository at this point in the history
… impossible for visitor impls to look at these values
  • Loading branch information
oli-obk committed Jul 11, 2024
1 parent 5dad689 commit 46c6db8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_ast/src/mut_visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ pub fn noop_visit_ty<T: MutVisitor>(ty: &mut P<Ty>, vis: &mut T) {
TyKind::Slice(ty) => vis.visit_ty(ty),
TyKind::Ptr(mt) => vis.visit_mt(mt),
TyKind::Ref(lt, mt) => {
visit_opt(lt, |lt| noop_visit_lifetime(lt, vis));
visit_opt(lt, |lt| vis.visit_lifetime(lt));
vis.visit_mt(mt);
}
TyKind::BareFn(bft) => {
Expand Down Expand Up @@ -962,7 +962,7 @@ pub fn noop_flat_map_generic_param<T: MutVisitor>(
vis.visit_id(id);
visit_attrs(attrs, vis);
vis.visit_ident(ident);
visit_vec(bounds, |bound| noop_visit_param_bound(bound, vis));
visit_vec(bounds, |bound| vis.visit_param_bound(bound, BoundKind::Bound));
match kind {
GenericParamKind::Lifetime => {}
GenericParamKind::Type { default } => {
Expand Down Expand Up @@ -1020,7 +1020,7 @@ fn noop_visit_where_predicate<T: MutVisitor>(pred: &mut WherePredicate, vis: &mu
}
WherePredicate::RegionPredicate(rp) => {
let WhereRegionPredicate { span, lifetime, bounds } = rp;
noop_visit_lifetime(lifetime, vis);
vis.visit_lifetime(lifetime);
visit_vec(bounds, |bound| vis.visit_param_bound(bound, BoundKind::Bound));
vis.visit_span(span);
}
Expand Down

0 comments on commit 46c6db8

Please sign in to comment.