coverage: All counter terms in an unused function are zero
This is currently handled automatically by the fact that codegen doesn't visit coverage statements in unused functions, but that will no longer be the case when unused IDs are identified by a separate query instead.
This commit is contained in:
@@ -535,8 +535,7 @@ fn add_unused_function_coverage<'tcx>(
|
||||
}),
|
||||
);
|
||||
|
||||
// An unused function's mappings will automatically be rewritten to map to
|
||||
// zero, because none of its counters/expressions are marked as seen.
|
||||
// An unused function's mappings will all be rewritten to map to zero.
|
||||
let function_coverage = FunctionCoverageCollector::unused(instance, function_coverage_info);
|
||||
|
||||
cx.coverage_cx().function_coverage_map.borrow_mut().insert(instance, function_coverage);
|
||||
|
||||
Reference in New Issue
Block a user