@@ -258,7 +258,7 @@ impl<'a, 'tcx> SpanlessEq<'a, 'tcx> {
258
258
}
259
259
260
260
pub fn eq_ty ( & mut self , left : & Ty < ' tcx > , right : & Ty < ' tcx > ) -> bool {
261
- self . eq_ty_kind ( & left. node , & right. node )
261
+ self . eq_ty_kind ( & left. sty , & right. sty )
262
262
}
263
263
264
264
#[ allow( clippy:: similar_names) ]
@@ -604,26 +604,26 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
604
604
}
605
605
}
606
606
607
- pub fn hash_ty ( & mut self , ty : & Ty < ' tcx > ) {
607
+ pub fn hash_ty ( & mut self , ty : & TyKind ) {
608
608
std:: mem:: discriminant ( & ty. node ) . hash ( & mut self . s ) ;
609
- match ty. sty {
610
- ty :: Slice ( ty) => {
609
+ match ty {
610
+ TyKind :: Slice ( ty) => {
611
611
self . hash_ty ( ty) ;
612
612
} ,
613
- ty :: Array ( ty, anon_const) => {
613
+ TyKind :: Array ( ty, anon_const) => {
614
614
self . hash_ty ( ty) ;
615
615
self . hash_expr ( & self . cx . tcx . hir ( ) . body ( anon_const. body ) . value ) ;
616
616
} ,
617
- ty :: Ptr ( mut_ty) => {
617
+ TyKind :: Ptr ( mut_ty) => {
618
618
self . hash_ty ( & mut_ty. ty ) ;
619
619
mut_ty. mutbl . hash ( & mut self . s ) ;
620
620
} ,
621
- ty :: Rptr ( lifetime, mut_ty) => {
621
+ TyKind :: Rptr ( lifetime, mut_ty) => {
622
622
self . hash_lifetime ( lifetime) ;
623
623
self . hash_ty ( & mut_ty. ty ) ;
624
624
mut_ty. mutbl . hash ( & mut self . s ) ;
625
625
} ,
626
- ty :: BareFn ( bfn) => {
626
+ TyKind :: BareFn ( bfn) => {
627
627
bfn. unsafety . hash ( & mut self . s ) ;
628
628
bfn. abi . hash ( & mut self . s ) ;
629
629
for arg in & bfn. decl . inputs {
@@ -639,13 +639,13 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
639
639
}
640
640
bfn. decl . c_variadic . hash ( & mut self . s ) ;
641
641
} ,
642
- ty :: Tup ( ty_list) => {
642
+ TyKind :: Tup ( ty_list) => {
643
643
for ty in ty_list {
644
644
self . hash_ty ( ty) ;
645
645
}
646
646
647
647
} ,
648
- ty :: Path ( qpath) => {
648
+ TyKind :: Path ( qpath) => {
649
649
match qpath {
650
650
QPath :: Resolved ( ref maybe_ty, ref path) => {
651
651
if let Some ( ref ty) = maybe_ty {
@@ -661,7 +661,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
661
661
} ,
662
662
}
663
663
} ,
664
- ty :: Def ( _, arg_list) => {
664
+ TyKind :: Def ( _, arg_list) => {
665
665
for arg in arg_list {
666
666
match arg {
667
667
GenericArg :: Lifetime ( ref l) => self . hash_lifetime ( l) ,
@@ -672,17 +672,17 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
672
672
}
673
673
}
674
674
} ,
675
- ty :: TraitObject ( _, lifetime) => {
675
+ TyKind :: TraitObject ( _, lifetime) => {
676
676
self . hash_lifetime ( lifetime) ;
677
677
678
678
} ,
679
- ty :: Typeof ( anon_const) => {
679
+ TyKind :: Typeof ( anon_const) => {
680
680
self . hash_expr ( & self . cx . tcx . hir ( ) . body ( anon_const. body ) . value ) ;
681
681
} ,
682
- ty :: CVarArgs ( lifetime) => {
683
- self . hash_lifetime ( lifetime) ;
682
+ TyKind :: CVarArgs ( lifetime) => {
683
+ self . hash_lifetime ( lifetime)
684
684
} ,
685
- ty :: Err | ty :: Infer | ty :: Never => { } ,
685
+ TyKind :: Err | TyKind :: Infer | TyKind :: Never => { } ,
686
686
}
687
687
}
688
688
}
0 commit comments