[−][src]Struct rustc_mir::transform::coverage::debug::UsedExpressions

pub(in transform::coverage) struct UsedExpressions {
    some_used_expression_operands: Option<FxHashMap<ExpressionOperandId, Vec<InjectedExpressionId>>>,
    some_unused_expressions: Option<Vec<(CoverageKind, Option<BasicCoverageBlock>, BasicCoverageBlock)>>,
}

If enabled, this struct captures additional data used to track whether expressions were used, directly or indirectly, to compute the coverage counts for all CoverageSpans, 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

impl UsedExpressions[src]

pub fn new() -> Self[src]

pub fn enable(&mut self)[src]

pub fn is_enabled(&self) -> bool[src]

pub fn add_expression_operands(&mut self, expression: &CoverageKind)[src]

pub fn expression_is_used(&self, expression: &CoverageKind) -> bool[src]

pub fn add_unused_expression_if_not_found(
    &mut self,
    expression: &CoverageKind,
    edge_from_bcb: Option<BasicCoverageBlock>,
    target_bcb: BasicCoverageBlock
)
[src]

pub fn get_unused_expressions(
    &self
) -> Vec<(CoverageKind, Option<BasicCoverageBlock>, BasicCoverageBlock)>
[src]

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)>
)
[src]

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).

pub fn alert_on_unused_expressions(&self, debug_counters: &DebugCounters)[src]

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

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]