Skip to content

Commit 9ed0cd5

Browse files
committed
flip walk_x_ty function names
1 parent 17defe1 commit 9ed0cd5

File tree

33 files changed

+65
-70
lines changed

33 files changed

+65
-70
lines changed

compiler/rustc_ast_lowering/src/index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
284284
self.insert(ty.span, ty.hir_id, Node::Ty(ty.as_unambig_ty()));
285285

286286
self.with_parent(ty.hir_id, |this| {
287-
intravisit::walk_ambig_ty(this, ty);
287+
intravisit::walk_ty(this, ty);
288288
});
289289
}
290290

compiler/rustc_hir/src/hir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2963,7 +2963,7 @@ impl<'hir> Ty<'hir> {
29632963
self.0.push(t.span);
29642964
return;
29652965
}
2966-
crate::intravisit::walk_ambig_ty(self, t);
2966+
crate::intravisit::walk_ty(self, t);
29672967
}
29682968
}
29692969

compiler/rustc_hir/src/intravisit.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ pub trait Visitor<'v>: Sized {
354354
}
355355

356356
fn visit_ty(&mut self, t: &'v Ty<'v, AmbigArg>) -> Self::Result {
357-
walk_ambig_ty(self, t)
357+
walk_ty(self, t)
358358
}
359359
fn visit_const_arg(&mut self, c: &'v ConstArg<'v, AmbigArg>) -> Self::Result {
360360
walk_ambig_const_arg(self, c)
@@ -496,7 +496,7 @@ pub trait Visitor<'v>: Sized {
496496

497497
pub trait VisitorExt<'v>: Visitor<'v> {
498498
fn visit_unambig_ty(&mut self, t: &'v Ty<'v>) -> Self::Result {
499-
walk_ty(self, t)
499+
walk_unambig_ty(self, t)
500500
}
501501
fn visit_unambig_const_arg(&mut self, c: &'v ConstArg<'v>) -> Self::Result {
502502
walk_const_arg(self, c)
@@ -900,7 +900,7 @@ pub fn walk_generic_arg<'v, V: Visitor<'v>>(
900900
}
901901
}
902902

903-
pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty<'v>) -> V::Result {
903+
pub fn walk_unambig_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty<'v>) -> V::Result {
904904
if let TyKind::Infer(()) = typ.kind {
905905
try_visit!(visitor.visit_id(typ.hir_id));
906906
return visitor.visit_shared_ty_const(typ.hir_id, typ.span, InferKind::Ty(typ));
@@ -909,7 +909,7 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty<'v>) -> V::Resul
909909
visitor.visit_ty(typ.as_ambig_ty())
910910
}
911911

912-
pub fn walk_ambig_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty<'v, AmbigArg>) -> V::Result {
912+
pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty<'v, AmbigArg>) -> V::Result {
913913
try_visit!(visitor.visit_id(typ.hir_id));
914914

915915
match typ.kind {

compiler/rustc_hir_analysis/src/check/compare_impl_item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,7 @@ fn compare_synthetic_generics<'tcx>(
16171617
{
16181618
ControlFlow::Break(ty.span)
16191619
} else {
1620-
intravisit::walk_ambig_ty(self, ty)
1620+
intravisit::walk_ty(self, ty)
16211621
}
16221622
}
16231623
}

compiler/rustc_hir_analysis/src/check/wfcheck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2208,7 +2208,7 @@ impl<'tcx> Visitor<'tcx> for CollectUsageSpans<'_> {
22082208
return;
22092209
}
22102210
}
2211-
intravisit::walk_ambig_ty(self, t);
2211+
intravisit::walk_ty(self, t);
22122212
}
22132213
}
22142214

compiler/rustc_hir_analysis/src/collect/generics_of.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,17 +466,17 @@ fn has_late_bound_regions<'tcx>(tcx: TyCtxt<'tcx>, node: Node<'tcx>) -> Option<S
466466
match ty.kind {
467467
hir::TyKind::BareFn(..) => {
468468
self.outer_index.shift_in(1);
469-
let res = intravisit::walk_ambig_ty(self, ty);
469+
let res = intravisit::walk_ty(self, ty);
470470
self.outer_index.shift_out(1);
471471
res
472472
}
473473
hir::TyKind::UnsafeBinder(_) => {
474474
self.outer_index.shift_in(1);
475-
let res = intravisit::walk_ambig_ty(self, ty);
475+
let res = intravisit::walk_ty(self, ty);
476476
self.outer_index.shift_out(1);
477477
res
478478
}
479-
_ => intravisit::walk_ambig_ty(self, ty),
479+
_ => intravisit::walk_ty(self, ty),
480480
}
481481
}
482482

compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
779779
self.with(scope, |this| {
780780
// a bare fn has no bounds, so everything
781781
// contained within is scoped within its binder.
782-
intravisit::walk_ambig_ty(this, ty);
782+
intravisit::walk_ty(this, ty);
783783
});
784784
}
785785
hir::TyKind::UnsafeBinder(binder) => {
@@ -809,7 +809,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
809809
self.with(scope, |this| {
810810
// a bare fn has no bounds, so everything
811811
// contained within is scoped within its binder.
812-
intravisit::walk_ambig_ty(this, ty);
812+
intravisit::walk_ty(this, ty);
813813
});
814814
}
815815
hir::TyKind::TraitObject(bounds, lifetime) => {
@@ -870,7 +870,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
870870
})
871871
});
872872
}
873-
_ => intravisit::walk_ambig_ty(self, ty),
873+
_ => intravisit::walk_ty(self, ty),
874874
}
875875
}
876876

@@ -2484,7 +2484,7 @@ fn is_late_bound_map(
24842484
}
24852485

24862486
_ => {
2487-
intravisit::walk_ambig_ty(self, ty);
2487+
intravisit::walk_ty(self, ty);
24882488
}
24892489
}
24902490
}

compiler/rustc_hir_analysis/src/collect/type_of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ pub(crate) fn type_alias_is_lazy<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) ->
528528
if let hir::TyKind::OpaqueDef(..) = t.kind {
529529
ControlFlow::Break(())
530530
} else {
531-
hir::intravisit::walk_ambig_ty(self, t)
531+
hir::intravisit::walk_ty(self, t)
532532
}
533533
}
534534
}

compiler/rustc_hir_analysis/src/hir_wf_check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fn diagnostic_hir_wf_check<'tcx>(
106106
}
107107

108108
self.depth += 1;
109-
intravisit::walk_ambig_ty(self, ty);
109+
intravisit::walk_ty(self, ty);
110110
self.depth -= 1;
111111
}
112112
}

compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
475475
{
476476
self.clauses.extend(clauses.iter().cloned());
477477
}
478-
intravisit::walk_ambig_ty(self, ty)
478+
intravisit::walk_ty(self, ty)
479479
}
480480
}
481481

0 commit comments

Comments
 (0)