diff options
| author | Ralf Jung <post@ralfj.de> | 2022-12-11 09:52:23 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-12-11 09:52:23 +0100 |
| commit | f25d8a6189afa3e99b5babb75f948e3039069fbb (patch) | |
| tree | b192f46b784d197549351e884b7448c06fa873f1 /compiler/rustc_mir_transform/src/coverage/tests.rs | |
| parent | 30e435907e324d679943b21c94fc8e7a9ddd7348 (diff) | |
| parent | 23a34c18f7b2ce8b20fed717ef48e2be1776246b (diff) | |
| download | rust-f25d8a6189afa3e99b5babb75f948e3039069fbb.tar.gz rust-f25d8a6189afa3e99b5babb75f948e3039069fbb.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/tests.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/coverage/tests.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_mir_transform/src/coverage/tests.rs b/compiler/rustc_mir_transform/src/coverage/tests.rs index 9c9ed5fa510..eba6a2b34e4 100644 --- a/compiler/rustc_mir_transform/src/coverage/tests.rs +++ b/compiler/rustc_mir_transform/src/coverage/tests.rs @@ -37,7 +37,7 @@ use rustc_data_structures::graph::WithSuccessors; use rustc_index::vec::{Idx, IndexVec}; use rustc_middle::mir::coverage::CoverageKind; use rustc_middle::mir::*; -use rustc_middle::ty::{self, Ty, TyCtxt}; +use rustc_middle::ty; use rustc_span::{self, BytePos, Pos, Span, DUMMY_SP}; // All `TEMP_BLOCK` targets should be replaced before calling `to_body() -> mir::Body`. @@ -47,7 +47,6 @@ struct MockBlocks<'tcx> { blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>, dummy_place: Place<'tcx>, next_local: usize, - bool_ty: Ty<'tcx>, } impl<'tcx> MockBlocks<'tcx> { @@ -56,7 +55,6 @@ impl<'tcx> MockBlocks<'tcx> { blocks: IndexVec::new(), dummy_place: Place { local: RETURN_PLACE, projection: ty::List::empty() }, next_local: 0, - bool_ty: TyCtxt::BOOL_TY_FOR_UNIT_TESTING, } } @@ -157,7 +155,6 @@ impl<'tcx> MockBlocks<'tcx> { fn switchint(&mut self, some_from_block: Option<BasicBlock>) -> BasicBlock { let switchint_kind = TerminatorKind::SwitchInt { discr: Operand::Move(Place::from(self.new_temp())), - switch_ty: self.bool_ty, // just a dummy value targets: SwitchTargets::static_if(0, TEMP_BLOCK, TEMP_BLOCK), }; self.add_block_from(some_from_block, switchint_kind) |
