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:
parent
75af3c58f9
commit
cd9021e8cb
10 changed files with 29 additions and 33 deletions
|
@ -29,8 +29,7 @@
|
|||
LL| |
|
||||
LL| |macro_rules! macro_that_defines_a_function {
|
||||
LL| | (fn $名:ident () $体:tt) => {
|
||||
LL| [0;35m1[0m| fn $名 () $体 [0;41mfn 他 () {}[0m
|
||||
^0
|
||||
LL| 0| fn $名 () $体 [0;41mfn 他 () {}[0m
|
||||
LL| | }
|
||||
LL| |}
|
||||
LL| |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue