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)));
}
}
}
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);
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 {