Simplify rustc_hir::intravisit::Visitor::visit_variant_data
.
It has four arguments that are never used. This avoids lots of argument passing in functions that feed into `visit_variant_data`.
This commit is contained in:
parent
f03ce30962
commit
8c5303898e
11 changed files with 32 additions and 116 deletions
|
@ -772,14 +772,9 @@ impl<'tcx> intravisit::Visitor<'tcx> for LintLevelMapBuilder<'tcx> {
|
|||
})
|
||||
}
|
||||
|
||||
fn visit_variant(
|
||||
&mut self,
|
||||
v: &'tcx hir::Variant<'tcx>,
|
||||
g: &'tcx hir::Generics<'tcx>,
|
||||
item_id: hir::HirId,
|
||||
) {
|
||||
fn visit_variant(&mut self, v: &'tcx hir::Variant<'tcx>) {
|
||||
self.with_lint_attrs(v.id, |builder| {
|
||||
intravisit::walk_variant(builder, v, g, item_id);
|
||||
intravisit::walk_variant(builder, v);
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue