mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
b5ee20f714
These headers and flags were historically needed, but are now unnecessary due to various changes in how coverage information is stored in MIR.
22 lines
838 B
Rust
22 lines
838 B
Rust
// Test that CleanupPostBorrowck cleans up the marker statements that are
|
|
// inserted during MIR building (after InstrumentCoverage is done with them),
|
|
// but leaves the statements that were added by InstrumentCoverage.
|
|
//
|
|
// Removed statement kinds: BlockMarker, SpanMarker
|
|
// Retained statement kinds: CounterIncrement, ExpressionUsed
|
|
|
|
//@ unit-test: InstrumentCoverage
|
|
//@ compile-flags: -Cinstrument-coverage -Zcoverage-options=branch -Zno-profiler-runtime
|
|
|
|
// EMIT_MIR instrument_coverage_cleanup.main.InstrumentCoverage.diff
|
|
// EMIT_MIR instrument_coverage_cleanup.main.CleanupPostBorrowck.diff
|
|
fn main() {
|
|
if !core::hint::black_box(true) {}
|
|
}
|
|
|
|
// CHECK-NOT: Coverage::BlockMarker
|
|
// CHECK-NOT: Coverage::SpanMarker
|
|
// CHECK: Coverage::CounterIncrement
|
|
// CHECK-NOT: Coverage::BlockMarker
|
|
// CHECK-NOT: Coverage::SpanMarker
|