[−][src]Struct rustc_mir::transform::instrument_coverage::Instrumentor

struct Instrumentor<'a, 'tcx> {
    tcx: TyCtxt<'tcx>,
    mir_def_id: DefId,
    mir_body: &'a mut Body<'tcx>,
    hir_body: &'tcx Body<'tcx>,
    function_source_hash: Option<u64>,
    num_counters: u32,
    num_expressions: u32,
}

Fields

tcx: TyCtxt<'tcx>mir_def_id: DefIdmir_body: &'a mut Body<'tcx>hir_body: &'tcx Body<'tcx>function_source_hash: Option<u64>num_counters: u32num_expressions: u32

Implementations

impl<'a, 'tcx> Instrumentor<'a, 'tcx>[src]

fn new(
    tcx: TyCtxt<'tcx>,
    src: MirSource<'tcx>,
    mir_body: &'a mut Body<'tcx>
) -> Self
[src]

fn next_counter(&mut self) -> CounterValueReference[src]

Counter IDs start from zero and go up.

fn next_expression(&mut self) -> InjectedExpressionIndex[src]

Expression IDs start from u32::MAX and go down because a CounterExpression can reference (add or subtract counts) of both Counter regions and CounterExpression regions. The counter expression operand IDs must be unique across both types.

fn function_source_hash(&mut self) -> u64[src]

fn inject_counters(&mut self)[src]

fn make_counter(&mut self) -> CoverageKind[src]

fn make_expression(
    &mut self,
    lhs: ExpressionOperandId,
    op: Op,
    rhs: ExpressionOperandId
) -> CoverageKind
[src]

fn inject_statement(
    &mut self,
    coverage_kind: CoverageKind,
    span: Span,
    block: BasicBlock
)
[src]

Auto Trait Implementations

impl<'a, 'tcx> !RefUnwindSafe for Instrumentor<'a, 'tcx>

impl<'a, 'tcx> !Send for Instrumentor<'a, 'tcx>

impl<'a, 'tcx> !Sync for Instrumentor<'a, 'tcx>

impl<'a, 'tcx> Unpin for Instrumentor<'a, 'tcx> where
    'tcx: 'a, 

impl<'a, 'tcx> !UnwindSafe for Instrumentor<'a, 'tcx>

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]