1
Fork 0

coverage: Don't store a body span in FunctionCoverageInfo

This commit is contained in:
Zalathar 2025-03-18 21:19:08 +11:00
parent cd2b978433
commit cc8336b6c1
10 changed files with 14 additions and 19 deletions

View file

@ -194,7 +194,6 @@ pub struct Mapping {
#[derive(TyEncodable, TyDecodable, Hash, HashStable)]
pub struct FunctionCoverageInfo {
pub function_source_hash: u64,
pub body_span: Span,
/// Used in conjunction with `priority_list` to create physical counters
/// and counter expressions, after MIR optimizations.

View file

@ -620,9 +620,8 @@ fn write_function_coverage_info(
function_coverage_info: &coverage::FunctionCoverageInfo,
w: &mut dyn io::Write,
) -> io::Result<()> {
let coverage::FunctionCoverageInfo { body_span, mappings, .. } = function_coverage_info;
let coverage::FunctionCoverageInfo { mappings, .. } = function_coverage_info;
writeln!(w, "{INDENT}coverage body span: {body_span:?}")?;
for coverage::Mapping { kind, span } in mappings {
writeln!(w, "{INDENT}coverage {kind:?} => {span:?};")?;
}