Skip to content

Commit eff1106

Browse files
committed
Remove unused span argument from check_mod and process_mod.
1 parent 925363f commit eff1106

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

compiler/rustc_lint/src/late.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ impl<'tcx, T: LateLintPass<'tcx>> LateContextAndPass<'tcx, T> {
7676
self.context.param_env = old_param_env;
7777
}
7878

79-
fn process_mod(&mut self, m: &'tcx hir::Mod<'tcx>, s: Span, n: hir::HirId) {
80-
lint_callback!(self, check_mod, m, s, n);
79+
fn process_mod(&mut self, m: &'tcx hir::Mod<'tcx>, n: hir::HirId) {
80+
lint_callback!(self, check_mod, m, n);
8181
hir_visit::walk_mod(self, m, n);
8282
}
8383
}
@@ -220,9 +220,9 @@ impl<'tcx, T: LateLintPass<'tcx>> hir_visit::Visitor<'tcx> for LateContextAndPas
220220
hir_visit::walk_inf(self, inf);
221221
}
222222

223-
fn visit_mod(&mut self, m: &'tcx hir::Mod<'tcx>, s: Span, n: hir::HirId) {
223+
fn visit_mod(&mut self, m: &'tcx hir::Mod<'tcx>, _: Span, n: hir::HirId) {
224224
if !self.context.only_module {
225-
self.process_mod(m, s, n);
225+
self.process_mod(m, n);
226226
}
227227
}
228228

@@ -358,8 +358,8 @@ fn late_lint_mod_pass<'tcx, T: LateLintPass<'tcx>>(
358358

359359
let mut cx = LateContextAndPass { context, pass };
360360

361-
let (module, span, hir_id) = tcx.hir().get_module(module_def_id);
362-
cx.process_mod(module, span, hir_id);
361+
let (module, _span, hir_id) = tcx.hir().get_module(module_def_id);
362+
cx.process_mod(module, hir_id);
363363

364364
// Visit the crate attributes
365365
if hir_id == hir::CRATE_HIR_ID {

compiler/rustc_lint/src/nonstandard_style.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -327,13 +327,7 @@ impl NonSnakeCase {
327327
}
328328

329329
impl<'tcx> LateLintPass<'tcx> for NonSnakeCase {
330-
fn check_mod(
331-
&mut self,
332-
cx: &LateContext<'_>,
333-
_: &'tcx hir::Mod<'tcx>,
334-
_: Span,
335-
id: hir::HirId,
336-
) {
330+
fn check_mod(&mut self, cx: &LateContext<'_>, _: &'tcx hir::Mod<'tcx>, id: hir::HirId) {
337331
if id != hir::CRATE_HIR_ID {
338332
return;
339333
}

compiler/rustc_lint/src/passes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ macro_rules! late_lint_methods {
1616
fn check_body_post(a: &$hir hir::Body<$hir>);
1717
fn check_crate();
1818
fn check_crate_post();
19-
fn check_mod(a: &$hir hir::Mod<$hir>, b: Span, c: hir::HirId);
19+
fn check_mod(a: &$hir hir::Mod<$hir>, b: hir::HirId);
2020
fn check_foreign_item(a: &$hir hir::ForeignItem<$hir>);
2121
fn check_item(a: &$hir hir::Item<$hir>);
2222
fn check_item_post(a: &$hir hir::Item<$hir>);

0 commit comments

Comments
 (0)