Struct rustc_mir_transform::coverage::debug::UsedExpressions [−][src]
pub(super) struct UsedExpressions {
some_used_expression_operands: Option<FxHashMap<ExpressionOperandId, Vec<InjectedExpressionId>>>,
some_unused_expressions: Option<Vec<(CoverageKind, Option<BasicCoverageBlock>, BasicCoverageBlock)>>,
}
Expand description
If enabled, this struct captures additional data used to track whether expressions were used,
directly or indirectly, to compute the coverage counts for all CoverageSpan
s, and any that are
not used are retained in the unused_expressions
Vec, to be included in debug output (logs
and/or a CoverageGraph
graphviz output).
Fields
some_used_expression_operands: Option<FxHashMap<ExpressionOperandId, Vec<InjectedExpressionId>>>
some_unused_expressions: Option<Vec<(CoverageKind, Option<BasicCoverageBlock>, BasicCoverageBlock)>>
Implementations
pub fn add_unused_expression_if_not_found(
&mut self,
expression: &CoverageKind,
edge_from_bcb: Option<BasicCoverageBlock>,
target_bcb: BasicCoverageBlock
)
pub fn get_unused_expressions(
&self
) -> Vec<(CoverageKind, Option<BasicCoverageBlock>, BasicCoverageBlock)>
pub fn get_unused_expressions(
&self
) -> Vec<(CoverageKind, Option<BasicCoverageBlock>, BasicCoverageBlock)>
Return the list of unused counters (if any) as a tuple with the counter (CoverageKind
),
optional from_bcb
(if it was an edge counter), and target_bcb
.
pub fn validate(
&mut self,
bcb_counters_without_direct_coverage_spans: &Vec<(Option<BasicCoverageBlock>, BasicCoverageBlock, CoverageKind)>
)
pub fn validate(
&mut self,
bcb_counters_without_direct_coverage_spans: &Vec<(Option<BasicCoverageBlock>, BasicCoverageBlock, CoverageKind)>
)
If enabled, validate that every BCB or edge counter not directly associated with a coverage span is at least indirectly associated (it is a dependency of a BCB counter that is associated with a coverage span).
Auto Trait Implementations
impl RefUnwindSafe for UsedExpressions
impl Send for UsedExpressions
impl Sync for UsedExpressions
impl Unpin for UsedExpressions
impl UnwindSafe for UsedExpressions
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: 56 bytes