Skip to content

Commit d8f0ea3

Browse files
committed
blanket: Report all unused annotations at once
1 parent e4561ae commit d8f0ea3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

ferrocene/tools/blanket/src/rustc_driver.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,19 @@ pub fn coverage(cmd: &ShowCommand, report: &CoverageReport) -> Result<Vec<Functi
3838
)?);
3939
}
4040

41+
let mut saw_unused = false;
4142
for (filename, annotations) in annotations {
4243
for Annotation { start, end: _, unused } in annotations {
4344
if unused {
44-
bail!("Unused annotation in {filename}:{start}");
45+
eprintln!("Unused annotation in {filename}:{start}");
4546
}
47+
saw_unused |= unused;
4648
}
4749
}
4850

51+
if saw_unused {
52+
bail!("saw 1 or more unused annotations");
53+
}
54+
4955
Ok(coverage)
5056
}

0 commit comments

Comments
 (0)