@@ -309,19 +309,14 @@ impl<'a, 'tcx> Instrumentor<'a, 'tcx> {
309
309
} ;
310
310
graphviz_data. add_bcb_coverage_span_with_counter ( bcb, & covspan, & counter_kind) ;
311
311
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) ;
319
314
320
315
inject_statement (
321
316
self . mir_body ,
322
317
counter_kind,
323
318
self . bcb_leader_bb ( bcb) ,
324
- Some ( make_code_region ( source_map , file_name , & self . source_file , span , body_span ) ) ,
319
+ Some ( code_region ) ,
325
320
) ;
326
321
}
327
322
}
@@ -498,6 +493,14 @@ fn make_code_region(
498
493
span : Span ,
499
494
body_span : Span ,
500
495
) -> 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
+
501
504
let ( start_line, mut start_col) = source_file. lookup_file_pos ( span. lo ( ) ) ;
502
505
let ( end_line, end_col) = if span. hi ( ) == span. lo ( ) {
503
506
let ( end_line, mut end_col) = ( start_line, start_col) ;
0 commit comments