[−][src]Struct rustc_mir::transform::coverage::debug::UsedExpressions
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]
&mut self,
expression: &CoverageKind,
edge_from_bcb: Option<BasicCoverageBlock>,
target_bcb: BasicCoverageBlock
)
pub fn get_unused_expressions(
&self
) -> Vec<(CoverageKind, Option<BasicCoverageBlock>, BasicCoverageBlock)>[src]
&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)>
)[src]
&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).
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.