mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
HirIdify ReadVisitor
This commit is contained in:
parent
0c6956f8ce
commit
3c93a95b1f
1 changed files with 1 additions and 2 deletions
|
@ -5,7 +5,6 @@ use rustc::hir::*;
|
|||
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
|
||||
use rustc::ty;
|
||||
use rustc::{declare_tool_lint, lint_array};
|
||||
use syntax::ast;
|
||||
|
||||
declare_clippy_lint! {
|
||||
/// **What it does:** Checks for a read and a write to the same variable where
|
||||
|
@ -287,7 +286,7 @@ fn check_stmt<'a, 'tcx>(vis: &mut ReadVisitor<'a, 'tcx>, stmt: &'tcx Stmt) -> St
|
|||
struct ReadVisitor<'a, 'tcx: 'a> {
|
||||
cx: &'a LateContext<'a, 'tcx>,
|
||||
/// The ID of the variable we're looking for.
|
||||
var: ast::NodeId,
|
||||
var: HirId,
|
||||
/// The expressions where the write to the variable occurred (for reporting
|
||||
/// in the lint).
|
||||
write_expr: &'tcx Expr,
|
||||
|
|
Loading…
Add table
Reference in a new issue