]> git.lizzy.rs Git - rust.git/commitdiff
Updated source to match with recent rustc `master` toolchain changes
authorFélix Fischer <felix91gr@gmail.com>
Fri, 29 Mar 2019 04:47:09 +0000 (01:47 -0300)
committerflip1995 <hello@philkrones.com>
Mon, 1 Apr 2019 18:37:05 +0000 (20:37 +0200)
clippy_lints/src/enum_glob_use.rs
clippy_lints/src/lifetimes.rs
src/driver.rs

index 37575f10f19574d926d0452332feeadc2d3115c3..afdf27376d8047898981de388fac65b3751cd132 100644 (file)
@@ -39,9 +39,10 @@ fn name(&self) -> &'static str {
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EnumGlobUse {
     fn check_mod(&mut self, cx: &LateContext<'a, 'tcx>, m: &'tcx Mod, _: Span, _: HirId) {
+        let map = cx.tcx.hir();
         // only check top level `use` statements
         for item in &m.item_ids {
-            self.lint_item(cx, cx.tcx.hir().expect_item(item.id));
+            self.lint_item(cx, map.expect_item(map.hir_to_node_id(item.id)));
         }
     }
 }
index 4b2ba60090f9d3583db40eff0ce25b71eedc170c..cd717e586e71732e6a10fa58791d9febb08fce40 100644 (file)
@@ -356,7 +356,8 @@ fn visit_ty(&mut self, ty: &'tcx Ty) {
                 self.collect_anonymous_lifetimes(path, ty);
             },
             TyKind::Def(item, _) => {
-                if let ItemKind::Existential(ref exist_ty) = self.cx.tcx.hir().expect_item(item.id).node {
+                let map = self.cx.tcx.hir();
+                if let ItemKind::Existential(ref exist_ty) = map.expect_item(map.hir_to_node_id(item.id)).node {
                     for bound in &exist_ty.bounds {
                         if let GenericBound::Outlives(_) = *bound {
                             self.record(&None);
index 01358f46dd70b6f5c82315f014357e3ceecdfc60..0b5c259ec4e9cb51371ad48a0ab853f87d35d9e2 100644 (file)
@@ -93,7 +93,7 @@ fn after_parsing(&mut self, compiler: &interface::Compiler) -> bool {
             ls.register_early_pass(Some(sess), true, false, pass);
         }
         for pass in late_lint_passes {
-            ls.register_late_pass(Some(sess), true, pass);
+            ls.register_late_pass(Some(sess), true, false, pass);
         }
 
         for (name, (to, deprecated_name)) in lint_groups {