@@ -154,7 +154,7 @@ impl<'a, 'tcx> Instrumentor<'a, 'tcx> {
154
154
let body_span = self . body_span ;
155
155
156
156
////////////////////////////////////////////////////
157
- // Compute `CoverageSpan`s from the `CoverageGraph`.
157
+ // Compute coverage spans from the `CoverageGraph`.
158
158
let coverage_spans = CoverageSpans :: generate_coverage_spans (
159
159
& self . mir_body ,
160
160
fn_sig_span,
@@ -164,9 +164,9 @@ impl<'a, 'tcx> Instrumentor<'a, 'tcx> {
164
164
165
165
////////////////////////////////////////////////////
166
166
// Create an optimized mix of `Counter`s and `Expression`s for the `CoverageGraph`. Ensure
167
- // every `CoverageSpan` has a `Counter` or `Expression` assigned to its `BasicCoverageBlock`
167
+ // every coverage span has a `Counter` or `Expression` assigned to its `BasicCoverageBlock`
168
168
// and all `Expression` dependencies (operands) are also generated, for any other
169
- // `BasicCoverageBlock`s not already associated with a `CoverageSpan` .
169
+ // `BasicCoverageBlock`s not already associated with a coverage span .
170
170
//
171
171
// Intermediate expressions (used to compute other `Expression` values), which have no
172
172
// direct association with any `BasicCoverageBlock`, are accumulated inside `coverage_counters`.
@@ -177,20 +177,20 @@ impl<'a, 'tcx> Instrumentor<'a, 'tcx> {
177
177
178
178
if let Ok ( ( ) ) = result {
179
179
////////////////////////////////////////////////////
180
- // Remove the counter or edge counter from of each `CoverageSpan` s associated
180
+ // Remove the counter or edge counter from of each coverage cpan' s associated
181
181
// `BasicCoverageBlock`, and inject a `Coverage` statement into the MIR.
182
182
//
183
- // `Coverage` statements injected from `CoverageSpan`s will include the code regions
183
+ // `Coverage` statements injected from coverage spans will include the code regions
184
184
// (source code start and end positions) to be counted by the associated counter.
185
185
//
186
- // These `CoverageSpan` -associated counters are removed from their associated
186
+ // These coverage-span -associated counters are removed from their associated
187
187
// `BasicCoverageBlock`s so that the only remaining counters in the `CoverageGraph`
188
188
// are indirect counters (to be injected next, without associated code regions).
189
189
self . inject_coverage_span_counters ( & coverage_spans) ;
190
190
191
191
////////////////////////////////////////////////////
192
192
// For any remaining `BasicCoverageBlock` counters (that were not associated with
193
- // any `CoverageSpan` ), inject `Coverage` statements (_without_ code region `Span`s )
193
+ // any coverage span ), inject `Coverage` statements (_without_ code region spans )
194
194
// to ensure `BasicCoverageBlock` counters that other `Expression`s may depend on
195
195
// are in fact counted, even though they don't directly contribute to counting
196
196
// their own independent code region's coverage.
@@ -215,9 +215,9 @@ impl<'a, 'tcx> Instrumentor<'a, 'tcx> {
215
215
}
216
216
}
217
217
218
- /// Inject a counter for each `CoverageSpan` . There can be multiple `CoverageSpan`s for a given
219
- /// BCB, but only one actual counter needs to be incremented per BCB. `bb_counters ` maps each
220
- /// `bcb` to its `Counter`, when injected. Subsequent `CoverageSpan`s for a BCB that already has
218
+ /// Inject a counter for each coverage span . There can be multiple coverage spans for a given
219
+ /// BCB, but only one actual counter needs to be incremented per BCB. `bcb_counters ` maps each
220
+ /// `bcb` to its `Counter`, when injected. Subsequent coverage spans for a BCB that already has
221
221
/// a `Counter` will inject an `Expression` instead, and compute its value by adding `ZERO` to
222
222
/// the BCB `Counter` value.
223
223
fn inject_coverage_span_counters ( & mut self , coverage_spans : & CoverageSpans ) {
@@ -248,12 +248,12 @@ impl<'a, 'tcx> Instrumentor<'a, 'tcx> {
248
248
}
249
249
}
250
250
251
- /// `inject_coverage_span_counters()` looped through the `CoverageSpan`s and injected the
252
- /// counter from the `CoverageSpan` s `BasicCoverageBlock`, removing it from the BCB in the
251
+ /// `inject_coverage_span_counters()` looped through the coverage spans and injected the
252
+ /// counter from the coverage span' s `BasicCoverageBlock`, removing it from the BCB in the
253
253
/// process (via `take_counter()`).
254
254
///
255
255
/// Any other counter associated with a `BasicCoverageBlock`, or its incoming edge, but not
256
- /// associated with a `CoverageSpan` , should only exist if the counter is an `Expression`
256
+ /// associated with a coverage span , should only exist if the counter is an `Expression`
257
257
/// dependency (one of the expression operands). Collect them, and inject the additional
258
258
/// counters into the MIR, without a reportable coverage span.
259
259
fn inject_indirect_counters ( & mut self ) {
0 commit comments