mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
Remove unused argument from visit_poly_trait_ref
.
This commit is contained in:
parent
308153563b
commit
0d1469ad34
2 changed files with 6 additions and 6 deletions
|
@ -2,7 +2,7 @@ use clippy_utils::diagnostics::span_lint_and_then;
|
|||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir::{
|
||||
def::Res, def_id::DefId, Item, ItemKind, PolyTraitRef, PrimTy, TraitBoundModifier, Ty, TyKind, UseKind,
|
||||
def::Res, def_id::DefId, Item, ItemKind, PolyTraitRef, PrimTy, Ty, TyKind, UseKind,
|
||||
};
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_session::{declare_tool_lint, impl_lint_pass};
|
||||
|
@ -120,7 +120,7 @@ impl<'tcx> LateLintPass<'tcx> for DisallowedTypes {
|
|||
}
|
||||
}
|
||||
|
||||
fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly: &'tcx PolyTraitRef<'tcx>, _: TraitBoundModifier) {
|
||||
fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly: &'tcx PolyTraitRef<'tcx>) {
|
||||
self.check_res_emit(cx, &poly.trait_ref.path.res, poly.trait_ref.path.span);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ use rustc_hir::FnRetTy::Return;
|
|||
use rustc_hir::{
|
||||
BareFnTy, BodyId, FnDecl, GenericArg, GenericBound, GenericParam, GenericParamKind, Generics, Impl, ImplItem,
|
||||
ImplItemKind, Item, ItemKind, LangItem, Lifetime, LifetimeName, ParamName, PolyTraitRef, PredicateOrigin,
|
||||
TraitBoundModifier, TraitFn, TraitItem, TraitItemKind, Ty, TyKind, WherePredicate,
|
||||
TraitFn, TraitItem, TraitItemKind, Ty, TyKind, WherePredicate,
|
||||
};
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_middle::hir::nested_filter as middle_nested_filter;
|
||||
|
@ -422,7 +422,7 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
|
|||
self.record(&Some(*lifetime));
|
||||
}
|
||||
|
||||
fn visit_poly_trait_ref(&mut self, poly_tref: &'tcx PolyTraitRef<'tcx>, tbm: TraitBoundModifier) {
|
||||
fn visit_poly_trait_ref(&mut self, poly_tref: &'tcx PolyTraitRef<'tcx>) {
|
||||
let trait_ref = &poly_tref.trait_ref;
|
||||
if CLOSURE_TRAIT_BOUNDS.iter().any(|&item| {
|
||||
self.cx
|
||||
|
@ -435,7 +435,7 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
|
|||
sub_visitor.visit_trait_ref(trait_ref);
|
||||
self.nested_elision_site_lts.append(&mut sub_visitor.all_lts());
|
||||
} else {
|
||||
walk_poly_trait_ref(self, poly_tref, tbm);
|
||||
walk_poly_trait_ref(self, poly_tref);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -466,7 +466,7 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
|
|||
self.unelided_trait_object_lifetime = true;
|
||||
}
|
||||
for bound in bounds {
|
||||
self.visit_poly_trait_ref(bound, TraitBoundModifier::None);
|
||||
self.visit_poly_trait_ref(bound);
|
||||
}
|
||||
},
|
||||
_ => walk_ty(self, ty),
|
||||
|
|
Loading…
Reference in a new issue