use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty;
use rustc::{declare_lint, lint_array};
-use syntax::ast::NodeId;
use syntax_pos::symbol::keywords::SelfType;
/// **What it does:** Checks for unnecessary repetition of structure name when a
}
impl<'a, 'tcx> Visitor<'tcx> for UseSelfVisitor<'a, 'tcx> {
- fn visit_path(&mut self, path: &'tcx Path, _id: NodeId) {
+ fn visit_path(&mut self, path: &'tcx Path, _id: HirId) {
if self.item_path.def == path.def && path.segments.last().expect(SEGMENTS_MSG).ident.name != SelfType.name() {
span_use_self_lint(self.cx, path);
}
use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
use crate::utils::{match_qpath, paths, span_lint};
use syntax::symbol::LocalInternedString;
-use syntax::ast::{Crate as AstCrate, ItemKind, Name, NodeId};
+use syntax::ast::{Crate as AstCrate, ItemKind, Name};
use syntax::codemap::Span;
use std::collections::{HashMap, HashSet};
walk_expr(self, expr);
}
- fn visit_path(&mut self, path: &'tcx Path, _: NodeId) {
+ fn visit_path(&mut self, path: &'tcx Path, _: HirId) {
if path.segments.len() == 1 {
self.output.insert(path.segments[0].ident.name);
}