about summary refs log tree commit diff
path: root/tests/coverage/unicode.coverage
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-02-15 18:12:27 +1100
committerZalathar <Zalathar@users.noreply.github.com>2024-02-16 10:57:03 +1100
commitcd9021e8cb1ab6cf5bdf341d7e0538703d86fc5b (patch)
tree8b35a966f14498003af9fdee4b3ae6fa5b92441e /tests/coverage/unicode.coverage
parent75af3c58f9df479894465e81d374e047082e8789 (diff)
downloadrust-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/unicode.coverage')
-rw-r--r--tests/coverage/unicode.coverage3
1 files changed, 1 insertions, 2 deletions
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|       |