diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-08-11 22:53:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-11 22:53:08 +0200 |
| commit | 8237efc52d909c482092fbf60356cfca59bf8ea0 (patch) | |
| tree | 3a817b002a70d7151595c25a24a45463cc22aa4d /src | |
| parent | cefcfda6e63f934b44368261c6972f75dbe791f6 (diff) | |
| parent | b8b851f42e9a322179526f55d3fecf2a83bfeb11 (diff) | |
| download | rust-8237efc52d909c482092fbf60356cfca59bf8ea0.tar.gz rust-8237efc52d909c482092fbf60356cfca59bf8ea0.zip | |
Rollup merge of #100392 - nnethercote:simplify-visitors, r=cjgillot
Simplify visitors By removing some unused arguments. r? `@cjgillot`
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/doctest.rs | 9 | ||||
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/unused_unit.rs | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs index 35964e3ba38..20ae102bc27 100644 --- a/src/librustdoc/doctest.rs +++ b/src/librustdoc/doctest.rs @@ -1289,14 +1289,9 @@ impl<'a, 'hir, 'tcx> intravisit::Visitor<'hir> for HirCollector<'a, 'hir, 'tcx> }); } - fn visit_variant( - &mut self, - v: &'hir hir::Variant<'_>, - g: &'hir hir::Generics<'_>, - item_id: hir::HirId, - ) { + fn visit_variant(&mut self, v: &'hir hir::Variant<'_>) { self.visit_testable(v.ident.to_string(), v.id, v.span, |this| { - intravisit::walk_variant(this, v, g, item_id); + intravisit::walk_variant(this, v); }); } diff --git a/src/tools/clippy/clippy_lints/src/unused_unit.rs b/src/tools/clippy/clippy_lints/src/unused_unit.rs index 52585e59566..cd1d90e860b 100644 --- a/src/tools/clippy/clippy_lints/src/unused_unit.rs +++ b/src/tools/clippy/clippy_lints/src/unused_unit.rs @@ -89,7 +89,7 @@ impl EarlyLintPass for UnusedUnit { } } - fn check_poly_trait_ref(&mut self, cx: &EarlyContext<'_>, poly: &ast::PolyTraitRef, _: &ast::TraitBoundModifier) { + fn check_poly_trait_ref(&mut self, cx: &EarlyContext<'_>, poly: &ast::PolyTraitRef) { let segments = &poly.trait_ref.path.segments; if_chain! { |
