diff options
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/query.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/coverage/query.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/coverage/query.rs b/compiler/rustc_mir_transform/src/coverage/query.rs index a849ed4c3e2..ef2724222ce 100644 --- a/compiler/rustc_mir_transform/src/coverage/query.rs +++ b/compiler/rustc_mir_transform/src/coverage/query.rs @@ -101,7 +101,9 @@ fn coverage_ids_info<'tcx>( // to any particular point in the control-flow graph. // (Keep this in sync with the injection of `ExpressionUsed` // statements in the `InstrumentCoverage` MIR pass.) - if let MappingKind::Code(CovTerm::Expression(id)) = mapping.kind { + if let MappingKind::Code { bcb } = mapping.kind + && let Some(CovTerm::Expression(id)) = fn_cov_info.term_for_bcb[bcb] + { expressions_seen.remove(id); } } |
