rust/src/test/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff
Rich Kadel 1d6b455fb4 Fixed conflict with drop elaboration and coverage
See
https://github.com/rust-lang/rust/issues/80045#issuecomment-745733339

Coverage statements are moved to the beginning of the BCB. This does
also affect what's counted before a panic, changing some results, but I
think these results may even be preferred? In any case, there are no
guarantees about what's counted when a panic occurs (by design).
2020-12-15 23:33:47 -08:00

13 lines
599 B
Diff

- // MIR for `bar` before InstrumentCoverage
+ // MIR for `bar` after InstrumentCoverage
fn bar() -> bool {
let mut _0: bool; // return place in scope 0 at /the/src/instrument_coverage.rs:19:13: 19:17
bb0: {
+ Coverage::Counter(1) for /the/src/instrument_coverage.rs:19:1 - 21:2; // scope 0 at /the/src/instrument_coverage.rs:21:2: 21:2
_0 = const true; // scope 0 at /the/src/instrument_coverage.rs:20:5: 20:9
return; // scope 0 at /the/src/instrument_coverage.rs:21:2: 21:2
}
}