From eb2d4cb5414361d9148bf43388012dcbdce80abe Mon Sep 17 00:00:00 2001 From: Zalathar Date: Sun, 26 Nov 2023 22:20:16 +1100 Subject: coverage: Skip spans that can't be un-expanded back to the function body When we extract coverage spans from MIR, we try to "un-expand" them back to spans that are inside the function's body span. In cases where that doesn't succeed, the current code just swaps in the entire body span instead. But that tends to result in coverage spans that are completely unrelated to the control flow of the affected code, so it's better to just discard those spans. --- tests/coverage/inline.coverage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/coverage/inline.coverage') diff --git a/tests/coverage/inline.coverage b/tests/coverage/inline.coverage index 6efd9a0830b..68a2e408306 100644 --- a/tests/coverage/inline.coverage +++ b/tests/coverage/inline.coverage @@ -50,5 +50,5 @@ LL| |#[inline(always)] LL| 0|fn error() { LL| 0| panic!("error"); - LL| 0|} + LL| |} -- cgit 1.4.1-3-g733a5