diff options
| author | bors <bors@rust-lang.org> | 2020-05-25 06:17:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-05-25 06:17:15 +0000 |
| commit | 997d953eeec0be62c59ea028c95cd7be49adf58f (patch) | |
| tree | 5d66bc795e08c23e2997743428c132a19ca756ba /src/librustc_mir | |
| parent | 2679c38fc33b5f69ce3c502c81315aa889035191 (diff) | |
| parent | 235929953719661e70e152e63521a1c446d76caf (diff) | |
| download | rust-997d953eeec0be62c59ea028c95cd7be49adf58f.tar.gz rust-997d953eeec0be62c59ea028c95cd7be49adf58f.zip | |
Auto merge of #72520 - jonas-schievink:cleanup-userty, r=matthewjasper
Clear MIR local type annotations after borrowck
Diffstat (limited to 'src/librustc_mir')
| -rw-r--r-- | src/librustc_mir/transform/cleanup_post_borrowck.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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; + } } } |
