about summary refs log tree commit diff
path: root/clippy_lints/src/utils
diff options
context:
space:
mode:
authorxd009642 <danielmckenna93@gmail.com>2019-07-28 09:31:05 +0100
committerxd009642 <danielmckenna93@gmail.com>2019-07-28 09:31:05 +0100
commit78ebcaa5263e0fd4c4ec89da648d8386c034ce84 (patch)
tree88a5e7142c6e9400d858cc95d027cfab8ee5282e /clippy_lints/src/utils
parent03c543515ad3c963f801c65da8f8bb6a4e0a35da (diff)
downloadrust-78ebcaa5263e0fd4c4ec89da648d8386c034ce84.tar.gz
rust-78ebcaa5263e0fd4c4ec89da648d8386c034ce84.zip
Fix dogfood test
Diffstat (limited to 'clippy_lints/src/utils')
-rw-r--r--clippy_lints/src/utils/hir_utils.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/clippy_lints/src/utils/hir_utils.rs b/clippy_lints/src/utils/hir_utils.rs
index e3da8c494ca..6fc5939a216 100644
--- a/clippy_lints/src/utils/hir_utils.rs
+++ b/clippy_lints/src/utils/hir_utils.rs
@@ -438,7 +438,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
                 self.hash_expr(fun);
                 self.hash_exprs(args);
             },
-            ExprKind::Cast(ref e, ref ty) => {
+            ExprKind::Cast(ref e, ref ty) | ExprKind::Type(ref e, ref ty) => {
                 self.hash_expr(e);
                 self.hash_ty(ty);
             },
@@ -518,10 +518,6 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
             ExprKind::Array(ref v) => {
                 self.hash_exprs(v);
             },
-            ExprKind::Type(ref e, ref ty) => {
-                self.hash_expr(e);
-                self.hash_ty(ty);
-            },
             ExprKind::Unary(lop, ref le) => {
                 lop.hash(&mut self.s);
                 self.hash_expr(le);
@@ -585,7 +581,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
     pub fn hash_lifetime(&mut self, lifetime: &Lifetime) {
         std::mem::discriminant(&lifetime.name).hash(&mut self.s);
         if let LifetimeName::Param(ref name) = lifetime.name {
-            std::mem::discriminant(&name).hash(&mut self.s);
+            std::mem::discriminant(name).hash(&mut self.s);
             match name {
                 ParamName::Plain(ref ident) => {
                     ident.name.hash(&mut self.s);
@@ -603,7 +599,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
     }
 
     pub fn hash_tykind(&mut self, ty: &TyKind) {
-        std::mem::discriminant(&ty).hash(&mut self.s);
+        std::mem::discriminant(ty).hash(&mut self.s);
         match ty {
             TyKind::Slice(ty) => {
                 self.hash_ty(ty);