]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/enum_glob_use.rs
Updated source to match with recent rustc `master` toolchain changes
[rust.git] / clippy_lints / src / enum_glob_use.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)));
         }
     }
 }