Restore the old `TypeckTables` in visit_body after walking the body
This commit is contained in:
flip1995 2019-02-16 22:40:44 +01:00
parent 32ee306acb
commit f204b7ec76
No known key found for this signature in database
GPG Key ID: 693086869D506637

View File

@ -2239,8 +2239,10 @@ impl<'a, 'b, 'tcx: 'a + 'b> ImplicitHasherConstructorVisitor<'a, 'b, 'tcx> {
impl<'a, 'b, 'tcx: 'a + 'b> Visitor<'tcx> for ImplicitHasherConstructorVisitor<'a, 'b, 'tcx> {
fn visit_body(&mut self, body: &'tcx Body) {
let prev_body = self.body;
self.body = self.cx.tcx.body_tables(body.id());
walk_body(self, body);
self.body = prev_body;
}
fn visit_expr(&mut self, e: &'tcx Expr) {