1010use crate :: rustc:: hir;
1111use crate :: rustc:: hir:: def:: Def ;
1212use 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 } ;
1414use crate :: rustc:: { declare_tool_lint, lint_array} ;
1515use crate :: rustc_errors:: Applicability ;
1616use crate :: syntax:: ast;
@@ -978,7 +978,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
978978 }
979979
980980 // 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 {
982982 // one of the associated types must be Self
983983 for predicate in & cx. tcx . predicates_of ( def_id) . predicates {
984984 match predicate {
@@ -2204,7 +2204,7 @@ fn ty_has_iter_method(
22042204 ] ;
22052205
22062206 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) ,
22082208 _ => unreachable ! ( ) ,
22092209 } ;
22102210 let method_name = match mutbl {
@@ -2213,8 +2213,8 @@ fn ty_has_iter_method(
22132213 } ;
22142214
22152215 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) ) ,
22182218 ty:: Adt ( adt, _) => adt. did ,
22192219 _ => return None ,
22202220 } ;
0 commit comments