Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 6ed9588

Browse files
committed
visit_x_unambig
1 parent 109440b commit 6ed9588

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

clippy_lints/src/box_default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ fn given_type(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
109109
match cx.tcx.parent_hir_node(expr.hir_id) {
110110
Node::LetStmt(LetStmt { ty: Some(ty), .. }) => {
111111
let mut v = InferVisitor::default();
112-
v.visit_unambig_ty(ty);
112+
v.visit_ty_unambig(ty);
113113
!v.0
114114
},
115115
Node::Expr(Expr {

clippy_lints/src/dereference.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ fn ty_contains_infer(ty: &hir::Ty<'_>) -> bool {
905905
}
906906
}
907907
let mut v = V(false);
908-
v.visit_unambig_ty(ty);
908+
v.visit_ty_unambig(ty);
909909
v.0
910910
}
911911

clippy_lints/src/implicit_hasher.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::borrow::Cow;
22
use std::collections::BTreeMap;
33

44
use rustc_errors::{Applicability, Diag};
5-
use rustc_hir::intravisit::{Visitor, VisitorExt, walk_ty, walk_body, walk_expr};
5+
use rustc_hir::intravisit::{Visitor, VisitorExt, walk_body, walk_expr, walk_ty};
66
use rustc_hir::{self as hir, AmbigArg, Body, Expr, ExprKind, GenericArg, Item, ItemKind, QPath, TyKind};
77
use rustc_hir_analysis::lower_ty;
88
use rustc_lint::{LateContext, LateLintPass};
@@ -111,7 +111,7 @@ impl<'tcx> LateLintPass<'tcx> for ImplicitHasher {
111111
match item.kind {
112112
ItemKind::Impl(impl_) => {
113113
let mut vis = ImplicitHasherTypeVisitor::new(cx);
114-
vis.visit_unambig_ty(impl_.self_ty);
114+
vis.visit_ty_unambig(impl_.self_ty);
115115

116116
for target in &vis.found {
117117
if !item.span.eq_ctxt(target.span()) {
@@ -158,7 +158,7 @@ impl<'tcx> LateLintPass<'tcx> for ImplicitHasher {
158158

159159
for ty in sig.decl.inputs {
160160
let mut vis = ImplicitHasherTypeVisitor::new(cx);
161-
vis.visit_unambig_ty(ty);
161+
vis.visit_ty_unambig(ty);
162162

163163
for target in &vis.found {
164164
if generics.span.from_expansion() {

clippy_lints/src/lifetimes.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,11 @@ fn could_use_elision<'tcx>(
232232

233233
// extract lifetimes in input argument types
234234
for arg in func.inputs {
235-
input_visitor.visit_unambig_ty(arg);
235+
input_visitor.visit_ty_unambig(arg);
236236
}
237237
// extract lifetimes in output type
238238
if let Return(ty) = func.output {
239-
output_visitor.visit_unambig_ty(ty);
239+
output_visitor.visit_ty_unambig(ty);
240240
}
241241
for lt in named_generics {
242242
input_visitor.visit_generic_param(lt);
@@ -340,7 +340,7 @@ fn explicit_self_type<'tcx>(cx: &LateContext<'tcx>, func: &FnDecl<'tcx>, ident:
340340
&& let Some(self_ty) = func.inputs.first()
341341
{
342342
let mut visitor = RefVisitor::new(cx);
343-
visitor.visit_unambig_ty(self_ty);
343+
visitor.visit_ty_unambig(self_ty);
344344

345345
!visitor.all_lts().is_empty()
346346
} else {
@@ -541,7 +541,7 @@ where
541541
try_visit!(self.visit_id(hir_id));
542542

543543
self.bounded_ty_depth += 1;
544-
try_visit!(self.visit_unambig_ty(bounded_ty));
544+
try_visit!(self.visit_ty_unambig(bounded_ty));
545545
self.bounded_ty_depth -= 1;
546546

547547
walk_list!(self, visit_param_bound, bounds);

clippy_lints/src/types/type_complexity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use super::TYPE_COMPLEXITY;
1010
pub(super) fn check(cx: &LateContext<'_>, ty: &hir::Ty<'_>, type_complexity_threshold: u64) -> bool {
1111
let score = {
1212
let mut visitor = TypeComplexityVisitor { score: 0, nest: 1 };
13-
visitor.visit_unambig_ty(ty);
13+
visitor.visit_ty_unambig(ty);
1414
visitor.score
1515
};
1616

clippy_lints/src/use_self.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ impl<'tcx> LateLintPass<'tcx> for UseSelf {
179179
for (impl_hir_ty, trait_sem_ty) in impl_inputs_outputs.zip(trait_method_sig.inputs_and_output) {
180180
if trait_sem_ty.walk().any(|inner| inner == self_ty.into()) {
181181
let mut visitor = SkipTyCollector::default();
182-
visitor.visit_unambig_ty(impl_hir_ty);
182+
visitor.visit_ty_unambig(impl_hir_ty);
183183
types_to_skip.extend(visitor.types_to_skip);
184184
}
185185
}

clippy_utils/src/ty/type_certainty/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ fn type_certainty(cx: &LateContext<'_>, ty: &hir::Ty<'_>) -> Certainty {
140140
}
141141

142142
let mut visitor = CertaintyVisitor::new(cx);
143-
visitor.visit_unambig_ty(ty);
143+
visitor.visit_ty_unambig(ty);
144144
visitor.certainty
145145
}
146146

0 commit comments

Comments
 (0)