Skip to content

Commit a045140

Browse files
committed
using "mir_body" (vs "body") in InstrumentCoverage
The mod uses both MIR bodies and HIR bodies, so I'm trying to maintain consistency with these names.
1 parent 3d0192e commit a045140

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_mir/transform/instrument_coverage.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ pub struct InstrumentCoverage;
2525
/// constructing the arguments for `llvm.instrprof.increment`.
2626
pub(crate) fn provide(providers: &mut Providers<'_>) {
2727
providers.coverage_data = |tcx, def_id| {
28-
let body = tcx.optimized_mir(def_id);
28+
let mir_body = tcx.optimized_mir(def_id);
2929
let count_code_region_fn =
3030
tcx.require_lang_item(lang_items::CountCodeRegionFnLangItem, None);
3131
let mut num_counters: u32 = 0;
32-
for (_, data) in traversal::preorder(body) {
32+
for (_, data) in traversal::preorder(mir_body) {
3333
if let Some(terminator) = &data.terminator {
3434
if let TerminatorKind::Call { func: Operand::Constant(func), .. } = &terminator.kind
3535
{

0 commit comments

Comments
 (0)