|
1 | 1 | use if_chain::if_chain; |
| 2 | +use rustc::hir; |
2 | 3 | use rustc::hir::def::{CtorKind, Def}; |
3 | 4 | use rustc::hir::intravisit::{walk_item, walk_path, walk_ty, NestedVisitorMap, Visitor}; |
4 | 5 | use rustc::hir::*; |
5 | 6 | use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintContext, LintPass}; |
6 | 7 | use rustc::ty; |
7 | | -use rustc::ty::DefIdTree; |
| 8 | +use rustc::ty::{DefIdTree, Ty}; |
8 | 9 | use rustc::{declare_lint_pass, declare_tool_lint}; |
9 | 10 | use rustc_errors::Applicability; |
10 | 11 | use syntax_pos::symbol::keywords::SelfUpper; |
@@ -68,14 +69,14 @@ fn span_use_self_lint(cx: &LateContext<'_, '_>, path: &Path) { |
68 | 69 | } |
69 | 70 |
|
70 | 71 | struct TraitImplTyVisitor<'a, 'tcx: 'a> { |
71 | | - item_type: ty::Ty<'tcx>, |
| 72 | + item_type: Ty<'tcx>, |
72 | 73 | cx: &'a LateContext<'a, 'tcx>, |
73 | 74 | trait_type_walker: ty::walk::TypeWalker<'tcx>, |
74 | 75 | impl_type_walker: ty::walk::TypeWalker<'tcx>, |
75 | 76 | } |
76 | 77 |
|
77 | 78 | impl<'a, 'tcx> Visitor<'tcx> for TraitImplTyVisitor<'a, 'tcx> { |
78 | | - fn visit_ty(&mut self, t: &'tcx Ty) { |
| 79 | + fn visit_ty(&mut self, t: &'tcx hir::Ty) { |
79 | 80 | let trait_ty = self.trait_type_walker.next(); |
80 | 81 | let impl_ty = self.impl_type_walker.next(); |
81 | 82 |
|
@@ -109,7 +110,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TraitImplTyVisitor<'a, 'tcx> { |
109 | 110 |
|
110 | 111 | fn check_trait_method_impl_decl<'a, 'tcx: 'a>( |
111 | 112 | cx: &'a LateContext<'a, 'tcx>, |
112 | | - item_type: ty::Ty<'tcx>, |
| 113 | + item_type: Ty<'tcx>, |
113 | 114 | impl_item: &ImplItem, |
114 | 115 | impl_decl: &'tcx FnDecl, |
115 | 116 | impl_trait_ref: &ty::TraitRef<'_>, |
|
0 commit comments