about summary refs log tree commit diff
path: root/tests/coverage/attr/nested.coverage
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-08 13:24:50 +0000
committerbors <bors@rust-lang.org>2024-07-08 13:24:50 +0000
commitcfd7cf5a0e497c238dcf9947e2eeec01837beeb4 (patch)
tree776950273fb7d4fd210f508377149c477800cb66 /tests/coverage/attr/nested.coverage
parent59a4f02f836f74c4cf08f47d76c9f6069a2f8276 (diff)
parent63c04f05e60ce27311fc1b874907188616beb558 (diff)
downloadrust-cfd7cf5a0e497c238dcf9947e2eeec01837beeb4.tar.gz
rust-cfd7cf5a0e497c238dcf9947e2eeec01837beeb4.zip
Auto merge of #127199 - Zalathar:hir-holes, r=oli-obk
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.

(It also potentially opens up the possibility of using HIR holes to modify branch or MC/DC spans, though we currently don't actually do this.)

Thus, this new implementation treats the following as holes:
- Closures (as before, including `async` and coroutines)
- All nested items
- Inline `const` (because why not)

This gives more accurate coverage reports, because lines occupied by holes don't show the execution count from the enclosing function.

Fixes #126626.
Diffstat (limited to 'tests/coverage/attr/nested.coverage')
-rw-r--r--tests/coverage/attr/nested.coverage5
1 files changed, 0 insertions, 5 deletions
diff --git a/tests/coverage/attr/nested.coverage b/tests/coverage/attr/nested.coverage
index bdd117b7dfa..2d64fe698ea 100644
--- a/tests/coverage/attr/nested.coverage
+++ b/tests/coverage/attr/nested.coverage
@@ -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|       |