mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 05:03:21 +00:00
Updated source to match with recent rustc master
toolchain changes
This commit is contained in:
parent
bbb7963735
commit
491f72442e
3 changed files with 5 additions and 3 deletions
|
@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue