]> git.lizzy.rs Git - rust.git/commitdiff
Fix build
authorNick Cameron <ncameron@mozilla.com>
Wed, 8 Aug 2018 06:00:23 +0000 (18:00 +1200)
committerNick Cameron <ncameron@mozilla.com>
Wed, 8 Aug 2018 06:01:06 +0000 (18:01 +1200)
clippy_lints/src/use_self.rs
clippy_lints/src/utils/internal_lints.rs

index 79da4c7d288d51afba0f642afa3a6c07a0f63dfb..eb2b4e801ebf712f2ebfe45463cdd5b73bdcf139 100644 (file)
@@ -5,7 +5,6 @@
 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
@@ -208,7 +207,7 @@ struct UseSelfVisitor<'a, 'tcx: '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);
         }
index 32aee09917717f48df24064b8028b263d03a8cc6..226817c8e51f0f140835f9c3f2fb09926b303cd6 100644 (file)
@@ -5,7 +5,7 @@
 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};
 
@@ -198,7 +198,7 @@ fn visit_expr(&mut self, expr: &'tcx Expr) {
         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);
         }