@@ -103,30 +103,18 @@ impl CoverageCounters {
103
103
MakeBcbCounters :: new ( self , basic_coverage_blocks) . make_bcb_counters ( coverage_spans)
104
104
}
105
105
106
- fn make_counter < F > ( & mut self , _debug_block_label_fn : F ) -> BcbCounter
107
- where
108
- F : Fn ( ) -> Option < String > ,
109
- {
106
+ fn make_counter ( & mut self ) -> BcbCounter {
110
107
let id = self . next_counter ( ) ;
111
108
BcbCounter :: Counter { id }
112
109
}
113
110
114
- fn make_expression < F > (
115
- & mut self ,
116
- lhs : Operand ,
117
- op : Op ,
118
- rhs : Operand ,
119
- _debug_block_label_fn : F ,
120
- ) -> BcbCounter
121
- where
122
- F : Fn ( ) -> Option < String > ,
123
- {
111
+ fn make_expression ( & mut self , lhs : Operand , op : Op , rhs : Operand ) -> BcbCounter {
124
112
let id = self . next_expression ( ) ;
125
113
BcbCounter :: Expression { id, lhs, op, rhs }
126
114
}
127
115
128
116
pub fn make_identity_counter ( & mut self , counter_operand : Operand ) -> BcbCounter {
129
- self . make_expression ( counter_operand, Op :: Add , Operand :: Zero , || unreachable ! ( ) )
117
+ self . make_expression ( counter_operand, Op :: Add , Operand :: Zero )
130
118
}
131
119
132
120
/// Counter IDs start from one and go up.
@@ -343,7 +331,6 @@ impl<'a> MakeBcbCounters<'a> {
343
331
branch_counter_operand,
344
332
Op :: Add ,
345
333
sumup_counter_operand,
346
- || None ,
347
334
) ;
348
335
debug ! ( " [new intermediate expression: {:?}]" , intermediate_expression) ;
349
336
let intermediate_expression_operand = intermediate_expression. as_operand ( ) ;
@@ -367,7 +354,6 @@ impl<'a> MakeBcbCounters<'a> {
367
354
branching_counter_operand,
368
355
Op :: Subtract ,
369
356
sumup_counter_operand,
370
- || Some ( format ! ( "{expression_branch:?}" ) ) ,
371
357
) ;
372
358
debug ! ( "{:?} gets an expression: {:?}" , expression_branch, expression) ;
373
359
let bcb = expression_branch. target_bcb ;
@@ -404,7 +390,7 @@ impl<'a> MakeBcbCounters<'a> {
404
390
// program results in a tight infinite loop, but it should still compile.
405
391
let one_path_to_target = self . bcb_has_one_path_to_target ( bcb) ;
406
392
if one_path_to_target || self . bcb_predecessors ( bcb) . contains ( & bcb) {
407
- let counter_kind = self . coverage_counters . make_counter ( || Some ( format ! ( "{bcb:?}" ) ) ) ;
393
+ let counter_kind = self . coverage_counters . make_counter ( ) ;
408
394
if one_path_to_target {
409
395
debug ! (
410
396
"{}{:?} gets a new counter: {:?}" ,
@@ -454,7 +440,6 @@ impl<'a> MakeBcbCounters<'a> {
454
440
sumup_edge_counter_operand,
455
441
Op :: Add ,
456
442
edge_counter_operand,
457
- || None ,
458
443
) ;
459
444
debug ! (
460
445
"{}new intermediate expression: {:?}" ,
@@ -470,7 +455,6 @@ impl<'a> MakeBcbCounters<'a> {
470
455
first_edge_counter_operand,
471
456
Op :: Add ,
472
457
some_sumup_edge_counter_operand. unwrap ( ) ,
473
- || Some ( format ! ( "{bcb:?}" ) ) ,
474
458
) ;
475
459
debug ! (
476
460
"{}{:?} gets a new counter (sum of predecessor counters): {:?}" ,
@@ -517,8 +501,7 @@ impl<'a> MakeBcbCounters<'a> {
517
501
}
518
502
519
503
// Make a new counter to count this edge.
520
- let counter_kind =
521
- self . coverage_counters . make_counter ( || Some ( format ! ( "{from_bcb:?}->{to_bcb:?}" ) ) ) ;
504
+ let counter_kind = self . coverage_counters . make_counter ( ) ;
522
505
debug ! (
523
506
"{}Edge {:?}->{:?} gets a new counter: {:?}" ,
524
507
NESTED_INDENT . repeat( debug_indent_level) ,
0 commit comments