Derive HashStable for HIR Expr and Ty.
This commit is contained in:
parent
b0047c18cb
commit
8a4cbcf220
3 changed files with 3 additions and 32 deletions
|
@ -19,18 +19,4 @@ impl<'ctx> rustc_hir::HashStableContext for StableHashingContext<'ctx> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn hash_hir_expr(&mut self, expr: &hir::Expr<'_>, hasher: &mut StableHasher) {
|
||||
let hir::Expr { hir_id, ref span, ref kind } = *expr;
|
||||
hir_id.hash_stable(self, hasher);
|
||||
span.hash_stable(self, hasher);
|
||||
kind.hash_stable(self, hasher);
|
||||
}
|
||||
|
||||
fn hash_hir_ty(&mut self, ty: &hir::Ty<'_>, hasher: &mut StableHasher) {
|
||||
let hir::Ty { hir_id, ref kind, ref span } = *ty;
|
||||
hir_id.hash_stable(self, hasher);
|
||||
kind.hash_stable(self, hasher);
|
||||
span.hash_stable(self, hasher);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue