Skip to content

Commit 629437e

Browse files
committed
coverage: Move a debug print into make_code_region
1 parent cad50f4 commit 629437e

File tree

1 file changed

+11
-8
lines changed
  • compiler/rustc_mir_transform/src/coverage

1 file changed

+11
-8
lines changed

compiler/rustc_mir_transform/src/coverage/mod.rs

+11-8
Original file line numberDiff line numberDiff line change
@@ -309,19 +309,14 @@ impl<'a, 'tcx> Instrumentor<'a, 'tcx> {
309309
};
310310
graphviz_data.add_bcb_coverage_span_with_counter(bcb, &covspan, &counter_kind);
311311

312-
debug!(
313-
"Calling make_code_region(file_name={}, source_file={:?}, span={}, body_span={})",
314-
file_name,
315-
self.source_file,
316-
source_map.span_to_diagnostic_string(span),
317-
source_map.span_to_diagnostic_string(body_span)
318-
);
312+
let code_region =
313+
make_code_region(source_map, file_name, &self.source_file, span, body_span);
319314

320315
inject_statement(
321316
self.mir_body,
322317
counter_kind,
323318
self.bcb_leader_bb(bcb),
324-
Some(make_code_region(source_map, file_name, &self.source_file, span, body_span)),
319+
Some(code_region),
325320
);
326321
}
327322
}
@@ -498,6 +493,14 @@ fn make_code_region(
498493
span: Span,
499494
body_span: Span,
500495
) -> CodeRegion {
496+
debug!(
497+
"Called make_code_region(file_name={}, source_file={:?}, span={}, body_span={})",
498+
file_name,
499+
source_file,
500+
source_map.span_to_diagnostic_string(span),
501+
source_map.span_to_diagnostic_string(body_span)
502+
);
503+
501504
let (start_line, mut start_col) = source_file.lookup_file_pos(span.lo());
502505
let (end_line, end_col) = if span.hi() == span.lo() {
503506
let (end_line, mut end_col) = (start_line, start_col);

0 commit comments

Comments
 (0)