@@ -438,7 +438,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
438
438
self . hash_expr ( fun) ;
439
439
self . hash_exprs ( args) ;
440
440
} ,
441
- ExprKind :: Cast ( ref e, ref ty) => {
441
+ ExprKind :: Cast ( ref e, ref ty) | ExprKind :: Type ( ref e , ref ty ) => {
442
442
self . hash_expr ( e) ;
443
443
self . hash_ty ( ty) ;
444
444
} ,
@@ -518,10 +518,6 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
518
518
ExprKind :: Array ( ref v) => {
519
519
self . hash_exprs ( v) ;
520
520
} ,
521
- ExprKind :: Type ( ref e, ref ty) => {
522
- self . hash_expr ( e) ;
523
- self . hash_ty ( ty) ;
524
- } ,
525
521
ExprKind :: Unary ( lop, ref le) => {
526
522
lop. hash ( & mut self . s ) ;
527
523
self . hash_expr ( le) ;
@@ -585,7 +581,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
585
581
pub fn hash_lifetime ( & mut self , lifetime : & Lifetime ) {
586
582
std:: mem:: discriminant ( & lifetime. name ) . hash ( & mut self . s ) ;
587
583
if let LifetimeName :: Param ( ref name) = lifetime. name {
588
- std:: mem:: discriminant ( & name) . hash ( & mut self . s ) ;
584
+ std:: mem:: discriminant ( name) . hash ( & mut self . s ) ;
589
585
match name {
590
586
ParamName :: Plain ( ref ident) => {
591
587
ident. name . hash ( & mut self . s ) ;
@@ -603,7 +599,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
603
599
}
604
600
605
601
pub fn hash_tykind ( & mut self , ty : & TyKind ) {
606
- std:: mem:: discriminant ( & ty) . hash ( & mut self . s ) ;
602
+ std:: mem:: discriminant ( ty) . hash ( & mut self . s ) ;
607
603
match ty {
608
604
TyKind :: Slice ( ty) => {
609
605
self . hash_ty ( ty) ;
0 commit comments