Skip to content

Commit e1c1f19

Browse files
committed
Fix a bunch of sites that were walking instead of visiting, making it impossible for visitor impls to look at these values
1 parent 17b2af8 commit e1c1f19

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_ast/src/mut_visit.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ pub fn noop_visit_ty<T: MutVisitor>(ty: &mut P<Ty>, vis: &mut T) {
503503
TyKind::Slice(ty) => vis.visit_ty(ty),
504504
TyKind::Ptr(mt) => vis.visit_mt(mt),
505505
TyKind::Ref(lt, mt) => {
506-
visit_opt(lt, |lt| noop_visit_lifetime(lt, vis));
506+
visit_opt(lt, |lt| vis.visit_lifetime(lt));
507507
vis.visit_mt(mt);
508508
}
509509
TyKind::BareFn(bft) => {
@@ -973,7 +973,7 @@ pub fn noop_flat_map_generic_param<T: MutVisitor>(
973973
vis.visit_id(id);
974974
visit_attrs(attrs, vis);
975975
vis.visit_ident(ident);
976-
visit_vec(bounds, |bound| noop_visit_param_bound(bound, vis));
976+
visit_vec(bounds, |bound| vis.visit_param_bound(bound, BoundKind::Bound));
977977
match kind {
978978
GenericParamKind::Lifetime => {}
979979
GenericParamKind::Type { default } => {
@@ -1031,7 +1031,7 @@ fn noop_visit_where_predicate<T: MutVisitor>(pred: &mut WherePredicate, vis: &mu
10311031
}
10321032
WherePredicate::RegionPredicate(rp) => {
10331033
let WhereRegionPredicate { span, lifetime, bounds } = rp;
1034-
noop_visit_lifetime(lifetime, vis);
1034+
vis.visit_lifetime(lifetime);
10351035
visit_vec(bounds, |bound| vis.visit_param_bound(bound, BoundKind::Bound));
10361036
vis.visit_span(span);
10371037
}

0 commit comments

Comments
 (0)