diff options
| author | flip1995 <hello@philkrones.com> | 2019-02-16 22:40:44 +0100 |
|---|---|---|
| committer | flip1995 <hello@philkrones.com> | 2019-02-17 01:50:13 +0100 |
| commit | f204b7ec767b6bcd3b4e0e5893e2108f2d13e031 (patch) | |
| tree | 810cd6be0200ad3f2884fad2e52a28ab8fdaa27f | |
| parent | 32ee306acbf87de1d7723e95e99c0e5e56e53749 (diff) | |
| download | rust-f204b7ec767b6bcd3b4e0e5893e2108f2d13e031.tar.gz rust-f204b7ec767b6bcd3b4e0e5893e2108f2d13e031.zip | |
Fix ICE #3717
Restore the old `TypeckTables` in visit_body after walking the body
| -rw-r--r-- | clippy_lints/src/types.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index 79e9f4f27d2..227b10cd29a 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -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) { |
