diff options
| author | Jakob Degen <jakob.e.degen@gmail.com> | 2022-04-16 09:27:54 -0400 |
|---|---|---|
| committer | Jakob Degen <jakob.e.degen@gmail.com> | 2022-05-23 17:49:04 -0400 |
| commit | 09b0936db2bb3be67451c6f8948e90987e764f81 (patch) | |
| tree | 33c3a24a12791982173c389fabd5d317223beb9a /compiler/rustc_mir_transform/src/coverage | |
| parent | 222c5724ecc922fe67815f428c19f82c129d9386 (diff) | |
| download | rust-09b0936db2bb3be67451c6f8948e90987e764f81.tar.gz rust-09b0936db2bb3be67451c6f8948e90987e764f81.zip | |
Refactor call terminator to always hold a destination place
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage')
| -rw-r--r-- | compiler/rustc_mir_transform/src/coverage/tests.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_mir_transform/src/coverage/tests.rs b/compiler/rustc_mir_transform/src/coverage/tests.rs index d787443f6aa..4615f9be33f 100644 --- a/compiler/rustc_mir_transform/src/coverage/tests.rs +++ b/compiler/rustc_mir_transform/src/coverage/tests.rs @@ -84,7 +84,7 @@ impl<'tcx> MockBlocks<'tcx> { fn link(&mut self, from_block: BasicBlock, to_block: BasicBlock) { match self.blocks[from_block].terminator_mut().kind { TerminatorKind::Assert { ref mut target, .. } - | TerminatorKind::Call { destination: Some((_, ref mut target)), .. } + | TerminatorKind::Call { target: Some(ref mut target), .. } | TerminatorKind::Drop { ref mut target, .. } | TerminatorKind::DropAndReplace { ref mut target, .. } | TerminatorKind::FalseEdge { real_target: ref mut target, .. } @@ -139,7 +139,8 @@ impl<'tcx> MockBlocks<'tcx> { TerminatorKind::Call { func: Operand::Copy(self.dummy_place.clone()), args: vec![], - destination: Some((self.dummy_place.clone(), TEMP_BLOCK)), + destination: self.dummy_place.clone(), + target: Some(TEMP_BLOCK), cleanup: None, from_hir_call: false, fn_span: DUMMY_SP, @@ -182,7 +183,7 @@ fn debug_basic_blocks<'tcx>(mir_body: &Body<'tcx>) -> String { let sp = format!("(span:{},{})", span.lo().to_u32(), span.hi().to_u32()); match kind { TerminatorKind::Assert { target, .. } - | TerminatorKind::Call { destination: Some((_, target)), .. } + | TerminatorKind::Call { target: Some(target), .. } | TerminatorKind::Drop { target, .. } | TerminatorKind::DropAndReplace { target, .. } | TerminatorKind::FalseEdge { real_target: target, .. } |
