diff --git a/compiler/rustc_hir/src/intravisit.rs b/compiler/rustc_hir/src/intravisit.rs index 957f8c1058e..9eeb04c8e01 100644 --- a/compiler/rustc_hir/src/intravisit.rs +++ b/compiler/rustc_hir/src/intravisit.rs @@ -422,7 +422,7 @@ pub trait Visitor<'v>: Sized { fn visit_qpath(&mut self, qpath: &'v QPath<'v>, id: HirId, _span: Span) { walk_qpath(self, qpath, id) } - fn visit_path(&mut self, path: &'v Path<'v>, _id: HirId) { + fn visit_path(&mut self, path: &Path<'v>, _id: HirId) { walk_path(self, path) } fn visit_path_segment(&mut self, path_segment: &'v PathSegment<'v>) { @@ -1126,7 +1126,7 @@ pub fn walk_qpath<'v, V: Visitor<'v>>(visitor: &mut V, qpath: &'v QPath<'v>, id: } } -pub fn walk_path<'v, V: Visitor<'v>>(visitor: &mut V, path: &'v Path<'v>) { +pub fn walk_path<'v, V: Visitor<'v>>(visitor: &mut V, path: &Path<'v>) { for segment in path.segments { visitor.visit_path_segment(segment); } diff --git a/compiler/rustc_hir_analysis/src/collect/lifetimes.rs b/compiler/rustc_hir_analysis/src/collect/lifetimes.rs index c11eed7ad9e..9a7b261fffd 100644 --- a/compiler/rustc_hir_analysis/src/collect/lifetimes.rs +++ b/compiler/rustc_hir_analysis/src/collect/lifetimes.rs @@ -814,7 +814,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> { } } - fn visit_path(&mut self, path: &'tcx hir::Path<'tcx>, _: hir::HirId) { + fn visit_path(&mut self, path: &hir::Path<'tcx>, _: hir::HirId) { for (i, segment) in path.segments.iter().enumerate() { let depth = path.segments.len() - i - 1; if let Some(ref args) = segment.args { diff --git a/compiler/rustc_lint/src/internal.rs b/compiler/rustc_lint/src/internal.rs index a6c7e819482..4f92661dbd3 100644 --- a/compiler/rustc_lint/src/internal.rs +++ b/compiler/rustc_lint/src/internal.rs @@ -117,7 +117,7 @@ impl<'tcx> LateLintPass<'tcx> for TyTyKind { fn check_path( &mut self, cx: &LateContext<'tcx>, - path: &'tcx rustc_hir::Path<'tcx>, + path: &rustc_hir::Path<'tcx>, _: rustc_hir::HirId, ) { if let Some(segment) = path.segments.iter().nth_back(1) diff --git a/compiler/rustc_lint/src/late.rs b/compiler/rustc_lint/src/late.rs index f484e31ba15..1d0b3f34d5d 100644 --- a/compiler/rustc_lint/src/late.rs +++ b/compiler/rustc_lint/src/late.rs @@ -292,7 +292,7 @@ impl<'tcx, T: LateLintPass<'tcx>> hir_visit::Visitor<'tcx> for LateContextAndPas hir_visit::walk_lifetime(self, lt); } - fn visit_path(&mut self, p: &'tcx hir::Path<'tcx>, id: hir::HirId) { + fn visit_path(&mut self, p: &hir::Path<'tcx>, id: hir::HirId) { lint_callback!(self, check_path, p, id); hir_visit::walk_path(self, p); } diff --git a/compiler/rustc_lint/src/passes.rs b/compiler/rustc_lint/src/passes.rs index 1c6a057d1a8..fc11d092ccb 100644 --- a/compiler/rustc_lint/src/passes.rs +++ b/compiler/rustc_lint/src/passes.rs @@ -44,7 +44,7 @@ macro_rules! late_lint_methods { fn check_struct_def(a: &$hir hir::VariantData<$hir>); fn check_field_def(a: &$hir hir::FieldDef<$hir>); fn check_variant(a: &$hir hir::Variant<$hir>); - fn check_path(a: &$hir hir::Path<$hir>, b: hir::HirId); + fn check_path(a: &hir::Path<$hir>, b: hir::HirId); fn check_attribute(a: &$hir ast::Attribute); /// Called when entering a syntax node that can have lint attributes such diff --git a/compiler/rustc_passes/src/dead.rs b/compiler/rustc_passes/src/dead.rs index 5d0224c35f3..da023fcf4c3 100644 --- a/compiler/rustc_passes/src/dead.rs +++ b/compiler/rustc_passes/src/dead.rs @@ -433,7 +433,7 @@ impl<'tcx> Visitor<'tcx> for MarkSymbolVisitor<'tcx> { self.in_pat = false; } - fn visit_path(&mut self, path: &'tcx hir::Path<'tcx>, _: hir::HirId) { + fn visit_path(&mut self, path: &hir::Path<'tcx>, _: hir::HirId) { self.handle_res(path.res); intravisit::walk_path(self, path); } diff --git a/compiler/rustc_passes/src/hir_stats.rs b/compiler/rustc_passes/src/hir_stats.rs index 140f02c046a..20951878e00 100644 --- a/compiler/rustc_passes/src/hir_stats.rs +++ b/compiler/rustc_passes/src/hir_stats.rs @@ -442,7 +442,7 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> { hir_visit::walk_lifetime(self, lifetime) } - fn visit_path(&mut self, path: &'v hir::Path<'v>, _id: hir::HirId) { + fn visit_path(&mut self, path: &hir::Path<'v>, _id: hir::HirId) { self.record("Path", Id::None, path); hir_visit::walk_path(self, path) } diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index 88bd655d8d3..da715523474 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -787,7 +787,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'tcx> { intravisit::walk_item(self, item); } - fn visit_path(&mut self, path: &'tcx hir::Path<'tcx>, id: hir::HirId) { + fn visit_path(&mut self, path: &hir::Path<'tcx>, id: hir::HirId) { if let Some(def_id) = path.res.opt_def_id() { let method_span = path.segments.last().map(|s| s.ident.span); let item_is_allowed = self.tcx.check_stability_allow_unstable( @@ -880,7 +880,7 @@ struct CheckTraitImplStable<'tcx> { } impl<'tcx> Visitor<'tcx> for CheckTraitImplStable<'tcx> { - fn visit_path(&mut self, path: &'tcx hir::Path<'tcx>, _id: hir::HirId) { + fn visit_path(&mut self, path: &hir::Path<'tcx>, _id: hir::HirId) { if let Some(def_id) = path.res.opt_def_id() { if let Some(stab) = self.tcx.lookup_stability(def_id) { self.fully_stable &= stab.level.is_stable(); diff --git a/compiler/rustc_passes/src/upvars.rs b/compiler/rustc_passes/src/upvars.rs index 9e41efce9ce..605cf0a93b8 100644 --- a/compiler/rustc_passes/src/upvars.rs +++ b/compiler/rustc_passes/src/upvars.rs @@ -66,7 +66,7 @@ impl CaptureCollector<'_, '_> { } impl<'tcx> Visitor<'tcx> for CaptureCollector<'_, 'tcx> { - fn visit_path(&mut self, path: &'tcx hir::Path<'tcx>, _: hir::HirId) { + fn visit_path(&mut self, path: &hir::Path<'tcx>, _: hir::HirId) { if let Res::Local(var_id) = path.res { self.visit_local_use(var_id, path.span); } diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index 893249e88cf..da0df596c41 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -489,7 +489,7 @@ impl<'tcx> Visitor<'tcx> for EmitIgnoredResolutionErrors<'tcx> { self.tcx.hir() } - fn visit_path(&mut self, path: &'tcx Path<'_>, _id: HirId) { + fn visit_path(&mut self, path: &Path<'tcx>, _id: HirId) { debug!("visiting path {:?}", path); if path.res == Res::Err { // We have less context here than in rustc_resolve, diff --git a/src/librustdoc/html/render/span_map.rs b/src/librustdoc/html/render/span_map.rs index 151ec2b28ad..b898db24246 100644 --- a/src/librustdoc/html/render/span_map.rs +++ b/src/librustdoc/html/render/span_map.rs @@ -140,7 +140,7 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> { self.tcx.hir() } - fn visit_path(&mut self, path: &'tcx rustc_hir::Path<'tcx>, _id: HirId) { + fn visit_path(&mut self, path: &rustc_hir::Path<'tcx>, _id: HirId) { if self.handle_macro(path.span) { return; } diff --git a/src/tools/clippy/clippy_lints/src/from_over_into.rs b/src/tools/clippy/clippy_lints/src/from_over_into.rs index 8b24a4962fb..6d9ede5f73b 100644 --- a/src/tools/clippy/clippy_lints/src/from_over_into.rs +++ b/src/tools/clippy/clippy_lints/src/from_over_into.rs @@ -126,7 +126,7 @@ impl<'a, 'tcx> Visitor<'tcx> for SelfFinder<'a, 'tcx> { self.cx.tcx.hir() } - fn visit_path(&mut self, path: &'tcx Path<'tcx>, _id: HirId) { + fn visit_path(&mut self, path: &Path<'tcx>, _id: HirId) { for segment in path.segments { match segment.ident.name { kw::SelfLower => self.lower.push(segment.ident.span), diff --git a/src/tools/clippy/clippy_lints/src/methods/option_map_unwrap_or.rs b/src/tools/clippy/clippy_lints/src/methods/option_map_unwrap_or.rs index 30421a6dd5a..910ee14855e 100644 --- a/src/tools/clippy/clippy_lints/src/methods/option_map_unwrap_or.rs +++ b/src/tools/clippy/clippy_lints/src/methods/option_map_unwrap_or.rs @@ -97,7 +97,7 @@ struct UnwrapVisitor<'a, 'tcx> { impl<'a, 'tcx> Visitor<'tcx> for UnwrapVisitor<'a, 'tcx> { type NestedFilter = nested_filter::All; - fn visit_path(&mut self, path: &'tcx Path<'_>, _id: HirId) { + fn visit_path(&mut self, path: &Path<'tcx>, _id: HirId) { self.identifiers.insert(ident(path)); walk_path(self, path); } @@ -116,7 +116,7 @@ struct MapExprVisitor<'a, 'tcx> { impl<'a, 'tcx> Visitor<'tcx> for MapExprVisitor<'a, 'tcx> { type NestedFilter = nested_filter::All; - fn visit_path(&mut self, path: &'tcx Path<'_>, _id: HirId) { + fn visit_path(&mut self, path: &Path<'tcx>, _id: HirId) { if self.identifiers.contains(&ident(path)) { self.found_identifier = true; return; diff --git a/src/tools/clippy/clippy_lints/src/utils/internal_lints/lint_without_lint_pass.rs b/src/tools/clippy/clippy_lints/src/utils/internal_lints/lint_without_lint_pass.rs index 1aebb8b3104..786d9608c85 100644 --- a/src/tools/clippy/clippy_lints/src/utils/internal_lints/lint_without_lint_pass.rs +++ b/src/tools/clippy/clippy_lints/src/utils/internal_lints/lint_without_lint_pass.rs @@ -330,7 +330,7 @@ struct LintCollector<'a, 'tcx> { impl<'a, 'tcx> Visitor<'tcx> for LintCollector<'a, 'tcx> { type NestedFilter = nested_filter::All; - fn visit_path(&mut self, path: &'tcx Path<'_>, _: HirId) { + fn visit_path(&mut self, path: &Path<'_>, _: HirId) { if path.segments.len() == 1 { self.output.insert(path.segments[0].ident.name); } diff --git a/src/tools/clippy/clippy_lints/src/utils/internal_lints/metadata_collector.rs b/src/tools/clippy/clippy_lints/src/utils/internal_lints/metadata_collector.rs index d06a616e4b3..857abe77e21 100644 --- a/src/tools/clippy/clippy_lints/src/utils/internal_lints/metadata_collector.rs +++ b/src/tools/clippy/clippy_lints/src/utils/internal_lints/metadata_collector.rs @@ -1019,7 +1019,7 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for ApplicabilityResolver<'a, 'hir> { self.cx.tcx.hir() } - fn visit_path(&mut self, path: &'hir hir::Path<'hir>, _id: hir::HirId) { + fn visit_path(&mut self, path: &hir::Path<'hir>, _id: hir::HirId) { for (index, enum_value) in paths::APPLICABILITY_VALUES.iter().enumerate() { if match_path(path, enum_value) { self.add_new_index(index); diff --git a/src/tools/clippy/clippy_utils/src/usage.rs b/src/tools/clippy/clippy_utils/src/usage.rs index 797722cfc1f..ab3976a13bd 100644 --- a/src/tools/clippy/clippy_utils/src/usage.rs +++ b/src/tools/clippy/clippy_utils/src/usage.rs @@ -128,7 +128,7 @@ impl<'a, 'tcx> intravisit::Visitor<'tcx> for BindingUsageFinder<'a, 'tcx> { } } - fn visit_path(&mut self, path: &'tcx hir::Path<'tcx>, _: hir::HirId) { + fn visit_path(&mut self, path: &hir::Path<'tcx>, _: hir::HirId) { if let hir::def::Res::Local(id) = path.res { if self.binding_ids.contains(&id) { self.usage_found = true;