Skip to content

Commit 0d1469a

Browse files
committed
Remove unused argument from visit_poly_trait_ref.
1 parent 3081535 commit 0d1469a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

clippy_lints/src/disallowed_types.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use clippy_utils::diagnostics::span_lint_and_then;
22

33
use rustc_data_structures::fx::FxHashMap;
44
use rustc_hir::{
5-
def::Res, def_id::DefId, Item, ItemKind, PolyTraitRef, PrimTy, TraitBoundModifier, Ty, TyKind, UseKind,
5+
def::Res, def_id::DefId, Item, ItemKind, PolyTraitRef, PrimTy, Ty, TyKind, UseKind,
66
};
77
use rustc_lint::{LateContext, LateLintPass};
88
use rustc_session::{declare_tool_lint, impl_lint_pass};
@@ -120,7 +120,7 @@ impl<'tcx> LateLintPass<'tcx> for DisallowedTypes {
120120
}
121121
}
122122

123-
fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly: &'tcx PolyTraitRef<'tcx>, _: TraitBoundModifier) {
123+
fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly: &'tcx PolyTraitRef<'tcx>) {
124124
self.check_res_emit(cx, &poly.trait_ref.path.res, poly.trait_ref.path.span);
125125
}
126126
}

clippy_lints/src/lifetimes.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustc_hir::FnRetTy::Return;
1010
use rustc_hir::{
1111
BareFnTy, BodyId, FnDecl, GenericArg, GenericBound, GenericParam, GenericParamKind, Generics, Impl, ImplItem,
1212
ImplItemKind, Item, ItemKind, LangItem, Lifetime, LifetimeName, ParamName, PolyTraitRef, PredicateOrigin,
13-
TraitBoundModifier, TraitFn, TraitItem, TraitItemKind, Ty, TyKind, WherePredicate,
13+
TraitFn, TraitItem, TraitItemKind, Ty, TyKind, WherePredicate,
1414
};
1515
use rustc_lint::{LateContext, LateLintPass};
1616
use rustc_middle::hir::nested_filter as middle_nested_filter;
@@ -422,7 +422,7 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
422422
self.record(&Some(*lifetime));
423423
}
424424

425-
fn visit_poly_trait_ref(&mut self, poly_tref: &'tcx PolyTraitRef<'tcx>, tbm: TraitBoundModifier) {
425+
fn visit_poly_trait_ref(&mut self, poly_tref: &'tcx PolyTraitRef<'tcx>) {
426426
let trait_ref = &poly_tref.trait_ref;
427427
if CLOSURE_TRAIT_BOUNDS.iter().any(|&item| {
428428
self.cx
@@ -435,7 +435,7 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
435435
sub_visitor.visit_trait_ref(trait_ref);
436436
self.nested_elision_site_lts.append(&mut sub_visitor.all_lts());
437437
} else {
438-
walk_poly_trait_ref(self, poly_tref, tbm);
438+
walk_poly_trait_ref(self, poly_tref);
439439
}
440440
}
441441

@@ -466,7 +466,7 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
466466
self.unelided_trait_object_lifetime = true;
467467
}
468468
for bound in bounds {
469-
self.visit_poly_trait_ref(bound, TraitBoundModifier::None);
469+
self.visit_poly_trait_ref(bound);
470470
}
471471
},
472472
_ => walk_ty(self, ty),

0 commit comments

Comments
 (0)