pub struct Fired { /* private fields */ }Expand description
Which rules fired, over one function or over a whole compilation.
A bit per rule and nothing else. This is on the path of every instruction selected, so what it costs is paid by every compilation whether or not anybody asked for the number, and the cheapest thing that answers the question is a flag per rule set once.
The index of a rule is how this is kept and not how it is written down. An index moves the
moment a rule is added above it, so Fired::listing names the rule file and the line instead:
a line is a place somebody can open, and a report written by one build can still be read against
a rule file that has grown since.
Implementations§
Source§impl Fired
impl Fired
Sourcepub fn merge(&mut self, other: &Fired)
pub fn merge(&mut self, other: &Fired)
Takes in everything another one recorded.
One compilation is many functions and one command line is many files, and the question is about all of them together. Merging rather than writing a file per function is also what keeps the answer the same however the work was scheduled.
Sourcepub fn listing(&self, table: &Table) -> String
pub fn listing(&self, table: &Table) -> String
What -Zrule-coverage=FILE writes.
One line per rule in the table, in the order the rule file writes them, each saying whether the rule fired and naming the file and line it is written at. Every rule is listed rather than only the ones that fired, so that one of these files says what the whole rule set was as well as what this compilation reached: a reader unioning them over a corpus needs both and would otherwise have to parse the rule file to get the second.
The first line is a comment holding the count, which is the number a person wants and the one thing here that is not worth making them add up.