Skip to content

Commit 9ec5bda

Browse files
committed
Remove unused span argument from visit_name.
1 parent eff1106 commit 9ec5bda

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/rustc_hir/src/intravisit.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ pub trait Visitor<'v>: Sized {
298298
fn visit_id(&mut self, _hir_id: HirId) {
299299
// Nothing to do.
300300
}
301-
fn visit_name(&mut self, _span: Span, _name: Symbol) {
301+
fn visit_name(&mut self, _name: Symbol) {
302302
// Nothing to do.
303303
}
304304
fn visit_ident(&mut self, ident: Ident) {
@@ -473,7 +473,7 @@ pub fn walk_local<'v, V: Visitor<'v>>(visitor: &mut V, local: &'v Local<'v>) {
473473
}
474474

475475
pub fn walk_ident<'v, V: Visitor<'v>>(visitor: &mut V, ident: Ident) {
476-
visitor.visit_name(ident.span, ident.name);
476+
visitor.visit_name(ident.name);
477477
}
478478

479479
pub fn walk_label<'v, V: Visitor<'v>>(visitor: &mut V, label: &'v Label) {
@@ -520,7 +520,7 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item<'v>) {
520520
ItemKind::ExternCrate(orig_name) => {
521521
visitor.visit_id(item.hir_id());
522522
if let Some(orig_name) = orig_name {
523-
visitor.visit_name(item.span, orig_name);
523+
visitor.visit_name(orig_name);
524524
}
525525
}
526526
ItemKind::Use(ref path, _) => {

src/tools/clippy/clippy_utils/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ pub struct ContainsName {
11211121
}
11221122

11231123
impl<'tcx> Visitor<'tcx> for ContainsName {
1124-
fn visit_name(&mut self, _: Span, name: Symbol) {
1124+
fn visit_name(&mut self, name: Symbol) {
11251125
if self.name == name {
11261126
self.result = true;
11271127
}

0 commit comments

Comments
 (0)