You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
pubconst parse_coverage_options:&str = "`branch` or `no-branch`";
399
400
pubconst parse_instrument_xray:&str = "either a boolean (`yes`, `no`, `on`, `off`, etc), or a comma separated list of settings: `always` or `never` (mutually exclusive), `ignore-loops`, `instruction-threshold=N`, `skip-entry`, `skip-exit`";
400
401
pubconst parse_unpretty:&str = "`string` or `string=string`";
401
402
pubconst parse_treat_err_as_bug:&str = "either no value or a non-negative number";
Copy file name to clipboardExpand all lines: src/doc/rustc/src/instrument-coverage.md
+8
Original file line number
Diff line number
Diff line change
@@ -346,6 +346,14 @@ $ llvm-cov report \
346
346
more fine-grained coverage options are added.
347
347
Using this value is currently not recommended.
348
348
349
+
## `-Z coverage-options=<options>`
350
+
351
+
This unstable option provides finer control over some aspects of coverage
352
+
instrumentation. Pass one or more of the following values, separated by commas.
353
+
354
+
-`branch` or `no-branch`
355
+
- Placeholder for potential branch coverage support in the future.
356
+
349
357
## Other references
350
358
351
359
Rust's implementation and workflow for source-based code coverage is based on the same library and tools used to implement [source-based code coverage in Clang]. (This document is partially based on the Clang guide.)
0 commit comments