From cd9021e8cb1ab6cf5bdf341d7e0538703d86fc5b Mon Sep 17 00:00:00 2001 From: Zalathar Date: Thu, 15 Feb 2024 18:12:27 +1100 Subject: 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 `()`. --- tests/coverage/unicode.coverage | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/coverage/unicode.coverage') diff --git a/tests/coverage/unicode.coverage b/tests/coverage/unicode.coverage index b284a557d57..af586111ba3 100644 --- a/tests/coverage/unicode.coverage +++ b/tests/coverage/unicode.coverage @@ -29,8 +29,7 @@ LL| | LL| |macro_rules! macro_that_defines_a_function { LL| | (fn $名:ident () $体:tt) => { - LL| 1| fn $名 () $体 fn 他 () {} - ^0 + LL| 0| fn $名 () $体 fn 他 () {} LL| | } LL| |} LL| | -- cgit 1.4.1-3-g733a5