File tree 1 file changed +3
-9
lines changed
compiler/rustc_mir_transform/src/coverage
1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -39,15 +39,9 @@ impl<'tcx> MirPass<'tcx> for InstrumentCoverage {
39
39
fn run_pass ( & self , tcx : TyCtxt < ' tcx > , mir_body : & mut mir:: Body < ' tcx > ) {
40
40
let mir_source = mir_body. source ;
41
41
42
- // If the InstrumentCoverage pass is called on promoted MIRs, skip them.
43
- // See: https://github.com/rust-lang/rust/pull/73011#discussion_r438317601
44
- if mir_source. promoted . is_some ( ) {
45
- trace ! (
46
- "InstrumentCoverage skipped for {:?} (already promoted for Miri evaluation)" ,
47
- mir_source. def_id( )
48
- ) ;
49
- return ;
50
- }
42
+ // This pass runs after MIR promotion, but before promoted MIR starts to
43
+ // be transformed, so it should never see promoted MIR.
44
+ assert ! ( mir_source. promoted. is_none( ) ) ;
51
45
52
46
let is_fn_like =
53
47
tcx. hir ( ) . get_by_def_id ( mir_source. def_id ( ) . expect_local ( ) ) . fn_kind ( ) . is_some ( ) ;
You can’t perform that action at this time.
0 commit comments