11use if_chain:: if_chain;
22use rustc:: hir:: * ;
33use rustc:: lint:: { in_external_macro, LateContext , LateLintPass , LintArray , LintContext , LintPass } ;
4- use rustc:: ty;
4+ use rustc:: ty:: { self , Ty } ;
55use rustc:: { declare_tool_lint, lint_array} ;
66use rustc_errors:: Applicability ;
77
@@ -147,7 +147,7 @@ fn get_ufcs_type_name(
147147 } )
148148}
149149
150- fn match_borrow_depth ( lhs : ty :: Ty < ' _ > , rhs : ty :: Ty < ' _ > ) -> bool {
150+ fn match_borrow_depth ( lhs : Ty < ' _ > , rhs : Ty < ' _ > ) -> bool {
151151 match ( & lhs. sty , & rhs. sty ) {
152152 ( ty:: Ref ( _, t1, _) , ty:: Ref ( _, t2, _) ) => match_borrow_depth ( & t1, & t2) ,
153153 ( l, r) => match ( l, r) {
@@ -157,7 +157,7 @@ fn match_borrow_depth(lhs: ty::Ty<'_>, rhs: ty::Ty<'_>) -> bool {
157157 }
158158}
159159
160- fn match_types ( lhs : ty :: Ty < ' _ > , rhs : ty :: Ty < ' _ > ) -> bool {
160+ fn match_types ( lhs : Ty < ' _ > , rhs : Ty < ' _ > ) -> bool {
161161 match ( & lhs. sty , & rhs. sty ) {
162162 ( ty:: Bool , ty:: Bool )
163163 | ( ty:: Char , ty:: Char )
@@ -172,7 +172,7 @@ fn match_types(lhs: ty::Ty<'_>, rhs: ty::Ty<'_>) -> bool {
172172 }
173173}
174174
175- fn get_type_name ( cx : & LateContext < ' _ , ' _ > , ty : ty :: Ty < ' _ > ) -> String {
175+ fn get_type_name ( cx : & LateContext < ' _ , ' _ > , ty : Ty < ' _ > ) -> String {
176176 match ty. sty {
177177 ty:: Adt ( t, _) => cx. tcx . def_path_str ( t. did ) ,
178178 ty:: Ref ( _, r, _) => get_type_name ( cx, & r) ,
0 commit comments