diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-02-15 18:12:27 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-02-16 10:57:03 +1100 |
| commit | cd9021e8cb1ab6cf5bdf341d7e0538703d86fc5b (patch) | |
| tree | 8b35a966f14498003af9fdee4b3ae6fa5b92441e /tests/coverage/coverage_attr_closure.coverage | |
| parent | 75af3c58f9df479894465e81d374e047082e8789 (diff) | |
| download | rust-cd9021e8cb1ab6cf5bdf341d7e0538703d86fc5b.tar.gz rust-cd9021e8cb1ab6cf5bdf341d7e0538703d86fc5b.zip | |
coverage: Discard spans that fill the entire function body
When we try to extract coverage-relevant spans from MIR, sometimes we see MIR statements/terminators whose spans cover the entire function body. Those spans tend to be unhelpful for coverage purposes, because they often represent compiler-inserted code, e.g. the implicit return value of `()`.
Diffstat (limited to 'tests/coverage/coverage_attr_closure.coverage')
| -rw-r--r-- | tests/coverage/coverage_attr_closure.coverage | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/coverage/coverage_attr_closure.coverage b/tests/coverage/coverage_attr_closure.coverage index 32c75b40d83..3474ad65063 100644 --- a/tests/coverage/coverage_attr_closure.coverage +++ b/tests/coverage/coverage_attr_closure.coverage @@ -14,13 +14,13 @@ LL| |#[coverage(on)] LL| 1|fn contains_closures_on() { LL| 1| let _local_closure_on = #[coverage(on)] - LL| 1| |input: &str| { + LL| 0| |input: &str| { LL| 0| println!("{input}"); - LL| 1| }; + LL| 0| }; LL| 1| let _local_closure_off = #[coverage(off)] - LL| 1| |input: &str| { + LL| | |input: &str| { LL| | println!("{input}"); - LL| 1| }; + LL| | }; LL| 1|} LL| | LL| |#[coverage(off)] |
