1
Fork 0

coverage: Extract hole spans from HIR instead of MIR

This makes it possible to treat more kinds of nested item/code as holes,
instead of being restricted to closures.
This commit is contained in:
Zalathar 2024-07-01 13:29:54 +10:00
parent 9b2c58d1fa
commit 63c04f05e6
19 changed files with 200 additions and 181 deletions

View file

@ -4,11 +4,6 @@
LL| |// Demonstrates the interaction between #[coverage(off)] and various kinds of
LL| |// nested function.
LL| |
LL| |// FIXME(#126625): Coverage attributes should apply recursively to nested functions.
LL| |// FIXME(#126626): When an inner (non-closure) function has `#[coverage(off)]`,
LL| |// its lines can still be marked with misleading execution counts from its enclosing
LL| |// function.
LL| |
LL| |#[coverage(off)]
LL| |fn do_stuff() {}
LL| |