[−][src]Struct rustc_mir::transform::coverage::counters::CoverageCounters
Manages the counter and expression indexes/IDs to generate CoverageKind components for MIR
Coverage statements.
Fields
function_source_hash: u64next_counter_id: u32num_expressions: u32debug_counters: DebugCountersImplementations
impl CoverageCounters[src]
pub fn new(function_source_hash: u64) -> Self[src]
pub fn enable_debug(&mut self)[src]
Activate the DebugCounters data structures, to provide additional debug formatting
features when formating CoverageKind (counter) values.
pub fn make_bcb_counters(
&mut self,
basic_coverage_blocks: &mut CoverageGraph,
coverage_spans: &Vec<CoverageSpan>
) -> Result<Vec<CoverageKind>, Error>[src]
&mut self,
basic_coverage_blocks: &mut CoverageGraph,
coverage_spans: &Vec<CoverageSpan>
) -> Result<Vec<CoverageKind>, Error>
Makes CoverageKind Counters and Expressions for the BasicCoverageBlocks directly or
indirectly associated with CoverageSpans, and returns additional Expressions
representing intermediate values.
pub(in transform::coverage::counters) fn make_counter<F>(
&mut self,
debug_block_label_fn: F
) -> CoverageKind where
F: Fn() -> Option<String>, [src]
&mut self,
debug_block_label_fn: F
) -> CoverageKind where
F: Fn() -> Option<String>,
pub(in transform::coverage::counters) fn make_expression<F>(
&mut self,
lhs: ExpressionOperandId,
op: Op,
rhs: ExpressionOperandId,
debug_block_label_fn: F
) -> CoverageKind where
F: Fn() -> Option<String>, [src]
&mut self,
lhs: ExpressionOperandId,
op: Op,
rhs: ExpressionOperandId,
debug_block_label_fn: F
) -> CoverageKind where
F: Fn() -> Option<String>,
pub fn make_identity_counter(
&mut self,
counter_operand: ExpressionOperandId
) -> CoverageKind[src]
&mut self,
counter_operand: ExpressionOperandId
) -> CoverageKind
pub(in transform::coverage::counters) fn next_counter(
&mut self
) -> CounterValueReference[src]
&mut self
) -> CounterValueReference
Counter IDs start from one and go up.
pub(in transform::coverage::counters) fn next_expression(
&mut self
) -> InjectedExpressionId[src]
&mut self
) -> InjectedExpressionId
Expression IDs start from u32::MAX and go down because a Expression can reference (add or subtract counts) of both Counter regions and Expression regions. The counter expression operand IDs must be unique across both types.
Auto Trait Implementations
impl RefUnwindSafe for CoverageCounters
impl Send for CoverageCounters
impl Sync for CoverageCounters
impl Unpin for CoverageCounters
impl UnwindSafe for CoverageCounters
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.