Skip to content

Commit

Permalink
Simplify rustc_hir::intravisit::Visitor::visit_enum_def.
Browse files Browse the repository at this point in the history
It is passed an argument that is never used.
  • Loading branch information
nnethercote committed Aug 11, 2022
1 parent 232bd80 commit b8b851f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_hir/src/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ pub trait Visitor<'v>: Sized {
fn visit_field_def(&mut self, s: &'v FieldDef<'v>) {
walk_field_def(self, s)
}
fn visit_enum_def(&mut self, enum_definition: &'v EnumDef<'v>, item_id: HirId, _: Span) {
fn visit_enum_def(&mut self, enum_definition: &'v EnumDef<'v>, item_id: HirId) {
walk_enum_def(self, enum_definition, item_id)
}
fn visit_variant(&mut self, v: &'v Variant<'v>) {
Expand Down Expand Up @@ -559,7 +559,7 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item<'v>) {
ItemKind::Enum(ref enum_definition, ref generics) => {
visitor.visit_generics(generics);
// `visit_enum_def()` takes care of visiting the `Item`'s `HirId`.
visitor.visit_enum_def(enum_definition, item.hir_id(), item.span)
visitor.visit_enum_def(enum_definition, item.hir_id())
}
ItemKind::Impl(Impl {
unsafety: _,
Expand Down

0 comments on commit b8b851f

Please sign in to comment.