Enum rustc_session::config::InstrumentCoverage[][src]

pub enum InstrumentCoverage {
    All,
    ExceptUnusedGenerics,
    ExceptUnusedFunctions,
    Off,
}
Expand description

The different settings that the -Z instrument-coverage flag can have.

Coverage instrumentation now supports combining -Z 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 -Z instrument-coverage=except-unused-functions or -Z 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 -Z instrument-coverage or -Z instrument-coverage=statement

ExceptUnusedGenerics

-Z instrument-coverage=except-unused-generics

ExceptUnusedFunctions

-Z instrument-coverage=except-unused-functions

Off

-Z instrument-coverage=off (or no, etc.)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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: