Skip to content

Commit

Permalink
Merge pull request #3908 from felix91gr/compiletest
Browse files Browse the repository at this point in the history
Unbreaking the clippy build step
  • Loading branch information
flip1995 authored Mar 29, 2019
2 parents 78dabc9 + 7ca85f5 commit df29b99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion clippy_lints/src/enum_glob_use.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ impl LintPass for EnumGlobUse {

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)));
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion clippy_lints/src/lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
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);
Expand Down
2 changes: 1 addition & 1 deletion src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl rustc_driver::Callbacks for ClippyCallbacks {
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 {
Expand Down

0 comments on commit df29b99

Please sign in to comment.