Skip to content

Commit df29b99

Browse files
authored
Merge pull request #3908 from felix91gr/compiletest
Unbreaking the clippy build step
2 parents 78dabc9 + 7ca85f5 commit df29b99

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

clippy_lints/src/enum_glob_use.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ impl LintPass for EnumGlobUse {
3939

4040
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EnumGlobUse {
4141
fn check_mod(&mut self, cx: &LateContext<'a, 'tcx>, m: &'tcx Mod, _: Span, _: HirId) {
42+
let map = cx.tcx.hir();
4243
// only check top level `use` statements
4344
for item in &m.item_ids {
44-
self.lint_item(cx, cx.tcx.hir().expect_item(item.id));
45+
self.lint_item(cx, map.expect_item(map.hir_to_node_id(item.id)));
4546
}
4647
}
4748
}

clippy_lints/src/lifetimes.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
356356
self.collect_anonymous_lifetimes(path, ty);
357357
},
358358
TyKind::Def(item, _) => {
359-
if let ItemKind::Existential(ref exist_ty) = self.cx.tcx.hir().expect_item(item.id).node {
359+
let map = self.cx.tcx.hir();
360+
if let ItemKind::Existential(ref exist_ty) = map.expect_item(map.hir_to_node_id(item.id)).node {
360361
for bound in &exist_ty.bounds {
361362
if let GenericBound::Outlives(_) = *bound {
362363
self.record(&None);

src/driver.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl rustc_driver::Callbacks for ClippyCallbacks {
9393
ls.register_early_pass(Some(sess), true, false, pass);
9494
}
9595
for pass in late_lint_passes {
96-
ls.register_late_pass(Some(sess), true, pass);
96+
ls.register_late_pass(Some(sess), true, false, pass);
9797
}
9898

9999
for (name, (to, deprecated_name)) in lint_groups {

0 commit comments

Comments
 (0)