mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
Remove unused span argument from walk_fn
.
This commit is contained in:
parent
42361da5d9
commit
f6005c6b89
3 changed files with 4 additions and 4 deletions
|
@ -425,7 +425,7 @@ struct UnsafeVisitor<'a, 'tcx> {
|
||||||
impl<'tcx> Visitor<'tcx> for UnsafeVisitor<'_, 'tcx> {
|
impl<'tcx> Visitor<'tcx> for UnsafeVisitor<'_, 'tcx> {
|
||||||
type NestedFilter = nested_filter::All;
|
type NestedFilter = nested_filter::All;
|
||||||
|
|
||||||
fn visit_fn(&mut self, kind: FnKind<'tcx>, decl: &'tcx FnDecl<'_>, body_id: BodyId, span: Span, id: HirId) {
|
fn visit_fn(&mut self, kind: FnKind<'tcx>, decl: &'tcx FnDecl<'_>, body_id: BodyId, _: Span, id: HirId) {
|
||||||
if self.has_unsafe {
|
if self.has_unsafe {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -438,7 +438,7 @@ impl<'tcx> Visitor<'tcx> for UnsafeVisitor<'_, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
walk_fn(self, kind, decl, body_id, span, id);
|
walk_fn(self, kind, decl, body_id, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn visit_expr(&mut self, expr: &'tcx Expr<'_>) {
|
fn visit_expr(&mut self, expr: &'tcx Expr<'_>) {
|
||||||
|
|
|
@ -70,7 +70,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedAsync {
|
||||||
) {
|
) {
|
||||||
if !span.from_expansion() && fn_kind.asyncness() == IsAsync::Async {
|
if !span.from_expansion() && fn_kind.asyncness() == IsAsync::Async {
|
||||||
let mut visitor = AsyncFnVisitor { cx, found_await: false };
|
let mut visitor = AsyncFnVisitor { cx, found_await: false };
|
||||||
walk_fn(&mut visitor, fn_kind, fn_decl, body.id(), span, hir_id);
|
walk_fn(&mut visitor, fn_kind, fn_decl, body.id(), hir_id);
|
||||||
if !visitor.found_await {
|
if !visitor.found_await {
|
||||||
span_lint_and_help(
|
span_lint_and_help(
|
||||||
cx,
|
cx,
|
||||||
|
|
|
@ -326,6 +326,6 @@ impl<'tcx> LateLintPass<'tcx> for Unwrap {
|
||||||
unwrappables: Vec::new(),
|
unwrappables: Vec::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
walk_fn(&mut v, kind, decl, body.id(), span, fn_id);
|
walk_fn(&mut v, kind, decl, body.id(), fn_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue