Skip to content

Commit f6f6d54

Browse files
committed
Auto merge of #9930 - smoelius:use-walk_generic_arg, r=Alexendoo
Use `walk_generic_arg` This is a tiny followup to to #9743, now that rust-lang/rust#103692 has landed. r? `@Alexendoo` changelog: none
2 parents 5595d7f + 2cda73f commit f6f6d54

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

clippy_lints/src/lifetimes.rs

+2-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use clippy_utils::trait_ref_of_method;
33
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
44
use rustc_hir::intravisit::nested_filter::{self as hir_nested_filter, NestedFilter};
55
use rustc_hir::intravisit::{
6-
walk_fn_decl, walk_generic_param, walk_generics, walk_impl_item_ref, walk_item, walk_param_bound,
6+
walk_fn_decl, walk_generic_arg, walk_generic_param, walk_generics, walk_impl_item_ref, walk_item, walk_param_bound,
77
walk_poly_trait_ref, walk_trait_ref, walk_ty, Visitor,
88
};
99
use rustc_hir::lang_items;
@@ -503,14 +503,7 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
503503
{
504504
self.lifetime_generic_arg_spans.entry(def_id).or_insert(l.span);
505505
}
506-
// Replace with `walk_generic_arg` if/when https://github.com/rust-lang/rust/pull/103692 lands.
507-
// walk_generic_arg(self, generic_arg);
508-
match generic_arg {
509-
GenericArg::Lifetime(lt) => self.visit_lifetime(lt),
510-
GenericArg::Type(ty) => self.visit_ty(ty),
511-
GenericArg::Const(ct) => self.visit_anon_const(&ct.value),
512-
GenericArg::Infer(inf) => self.visit_infer(inf),
513-
}
506+
walk_generic_arg(self, generic_arg);
514507
}
515508
}
516509

0 commit comments

Comments
 (0)