1
Fork 0

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 `()`.
This commit is contained in:
Zalathar 2024-02-15 18:12:27 +11:00
parent 75af3c58f9
commit cd9021e8cb
10 changed files with 29 additions and 33 deletions

View file

@ -21,6 +21,6 @@
LL| |macro_name_span_helper::macro_that_defines_a_function! {
LL| 1| fn affected_function() {
LL| 1| macro_with_an_unreasonably_and_egregiously_long_name!();
LL| 1| }
LL| | }
LL| |}