10
10
use crate :: rustc:: hir;
11
11
use crate :: rustc:: hir:: def:: Def ;
12
12
use crate :: rustc:: lint:: { in_external_macro, LateContext , LateLintPass , Lint , LintArray , LintContext , LintPass } ;
13
- use crate :: rustc:: ty:: { self , Predicate , Ty , TyKind } ;
13
+ use crate :: rustc:: ty:: { self , Predicate , Ty } ;
14
14
use crate :: rustc:: { declare_tool_lint, lint_array} ;
15
15
use crate :: rustc_errors:: Applicability ;
16
16
use crate :: syntax:: ast;
@@ -978,7 +978,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
978
978
}
979
979
980
980
// if return type is impl trait, check the associated types
981
- if let TyKind :: Opaque ( def_id, _) = ret_ty. sty {
981
+ if let ty :: Opaque ( def_id, _) = ret_ty. sty {
982
982
// one of the associated types must be Self
983
983
for predicate in & cx. tcx . predicates_of ( def_id) . predicates {
984
984
match predicate {
@@ -2204,7 +2204,7 @@ fn ty_has_iter_method(
2204
2204
] ;
2205
2205
2206
2206
let ( self_ty, mutbl) = match self_ref_ty. sty {
2207
- ty:: TyKind :: Ref ( _, self_ty, mutbl) => ( self_ty, mutbl) ,
2207
+ ty:: Ref ( _, self_ty, mutbl) => ( self_ty, mutbl) ,
2208
2208
_ => unreachable ! ( ) ,
2209
2209
} ;
2210
2210
let method_name = match mutbl {
@@ -2213,8 +2213,8 @@ fn ty_has_iter_method(
2213
2213
} ;
2214
2214
2215
2215
let def_id = match self_ty. sty {
2216
- ty:: TyKind :: Array ( ..) => return Some ( ( INTO_ITER_ON_ARRAY , "array" , method_name) ) ,
2217
- ty:: TyKind :: Slice ( ..) => return Some ( ( INTO_ITER_ON_REF , "slice" , method_name) ) ,
2216
+ ty:: Array ( ..) => return Some ( ( INTO_ITER_ON_ARRAY , "array" , method_name) ) ,
2217
+ ty:: Slice ( ..) => return Some ( ( INTO_ITER_ON_REF , "slice" , method_name) ) ,
2218
2218
ty:: Adt ( adt, _) => adt. did ,
2219
2219
_ => return None ,
2220
2220
} ;
0 commit comments