Skip to content

Commit

Permalink
Fix dogfood test
Browse files Browse the repository at this point in the history
  • Loading branch information
xd009642 committed Jul 28, 2019
1 parent 03c5435 commit 78ebcaa
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions clippy_lints/src/utils/hir_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 78ebcaa

Please sign in to comment.