rust/tests/ui/instrument-coverage/coverage-options.rs
Zalathar 3407fcc12e coverage: Add -Zcoverage-options for fine control of coverage
This new nightly-only flag can be used to toggle fine-grained flags that
control the details of coverage instrumentation.

Currently the only supported flag value is `branch` (or `no-branch`), which is
a placeholder for upcoming support for branch coverage. Other flag values can
be added in the future, to prototype proposed new behaviour, or to enable
special non-default behaviour.
2024-03-13 11:14:10 +11:00

15 lines
354 B
Rust

//@ needs-profiler-support
//@ revisions: branch no-branch bad
//@ compile-flags -Cinstrument-coverage
//@ [branch] check-pass
//@ [branch] compile-flags: -Zcoverage-options=branch
//@ [no-branch] check-pass
//@ [no-branch] compile-flags: -Zcoverage-options=no-branch
//@ [bad] check-fail
//@ [bad] compile-flags: -Zcoverage-options=bad
fn main() {}