From 235929953719661e70e152e63521a1c446d76caf Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sun, 24 May 2020 02:57:21 +0200 Subject: Clear MIR local type annotations after borrowck --- src/librustc_mir/transform/cleanup_post_borrowck.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/librustc_mir') diff --git a/src/librustc_mir/transform/cleanup_post_borrowck.rs b/src/librustc_mir/transform/cleanup_post_borrowck.rs index e80da4f756c..3f3d247a829 100644 --- a/src/librustc_mir/transform/cleanup_post_borrowck.rs +++ b/src/librustc_mir/transform/cleanup_post_borrowck.rs @@ -35,6 +35,10 @@ impl<'tcx> MirPass<'tcx> for CleanupNonCodegenStatements { let mut delete = DeleteNonCodegenStatements { tcx }; delete.visit_body(body); body.user_type_annotations.raw.clear(); + + for decl in &mut body.local_decls { + decl.user_ty = None; + } } } -- cgit 1.4.1-3-g733a5