Enum rustc_session::config::InstrumentCoverage
source · pub enum InstrumentCoverage {
All,
ExceptUnusedGenerics,
ExceptUnusedFunctions,
Off,
}
Expand description
The different settings that the -C instrument-coverage
flag can have.
Coverage instrumentation now supports combining -C instrument-coverage
with compiler and linker optimization (enabled with -O
or -C opt-level=1
and higher). Nevertheless, there are many variables, depending on options
selected, code structure, and enabled attributes. If errors are encountered,
either while compiling or when generating llvm-cov show
reports, consider
lowering the optimization level, including or excluding -C link-dead-code
,
or using -Zunstable-options -C instrument-coverage=except-unused-functions
or -Zunstable-options -C instrument-coverage=except-unused-generics
.
Note that ExceptUnusedFunctions
means: When mapgen.rs
generates the
coverage map, it will not attempt to generate synthetic functions for unused
(and not code-generated) functions (whether they are generic or not). As a
result, non-codegenned functions will not be included in the coverage map,
and will not appear, as covered or uncovered, in coverage reports.
ExceptUnusedGenerics
will add synthetic functions to the coverage map,
unless the function has type parameters.
Variants§
All
Default -C instrument-coverage
or -C instrument-coverage=statement
ExceptUnusedGenerics
-Zunstable-options -C instrument-coverage=except-unused-generics
ExceptUnusedFunctions
-Zunstable-options -C instrument-coverage=except-unused-functions
Off
-C instrument-coverage=off
(or no
, etc.)
Trait Implementations§
source§impl Clone for InstrumentCoverage
impl Clone for InstrumentCoverage
source§fn clone(&self) -> InstrumentCoverage
fn clone(&self) -> InstrumentCoverage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InstrumentCoverage
impl Debug for InstrumentCoverage
source§impl DepTrackingHash for InstrumentCoverage
impl DepTrackingHash for InstrumentCoverage
fn hash(
&self,
hasher: &mut DefaultHasher,
_: ErrorOutputType,
_for_crate_hash: bool
)
source§impl Hash for InstrumentCoverage
impl Hash for InstrumentCoverage
source§impl PartialEq<InstrumentCoverage> for InstrumentCoverage
impl PartialEq<InstrumentCoverage> for InstrumentCoverage
source§fn eq(&self, other: &InstrumentCoverage) -> bool
fn eq(&self, other: &InstrumentCoverage) -> bool
impl Copy for InstrumentCoverage
impl StructuralPartialEq for InstrumentCoverage
Auto Trait Implementations§
impl RefUnwindSafe for InstrumentCoverage
impl Send for InstrumentCoverage
impl Sync for InstrumentCoverage
impl Unpin for InstrumentCoverage
impl UnwindSafe for InstrumentCoverage
Blanket Implementations§
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
All
: 0 bytesExceptUnusedGenerics
: 0 bytesExceptUnusedFunctions
: 0 bytesOff
: 0 bytes