Partially hash let declaration in SpanlessHash

The hash never needs to be good but before it was simply doing nothing
for these.
This commit is contained in:
mcarton 2016-10-02 02:17:04 +02:00
parent 6302e41ccb
commit 9a3f53dee6
No known key found for this signature in database
GPG key ID: 5E427C794CBA45E8
2 changed files with 28 additions and 16 deletions

View file

@ -528,10 +528,15 @@ impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> {
pub fn hash_stmt(&mut self, b: &Stmt) {
match b.node {
StmtDecl(ref _decl, _) => {
StmtDecl(ref decl, _) => {
let c: fn(_, _) -> _ = StmtDecl;
c.hash(&mut self.s);
// TODO: decl
if let DeclLocal(ref local) = decl.node {
if let Some(ref init) = local.init {
self.hash_expr(init);
}
}
}
StmtExpr(ref expr, _) => {
let c: fn(_, _) -> _ = StmtExpr;