about summary refs log tree commit diff
path: root/tests/coverage/async2.cov-map
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2023-11-26 22:20:16 +1100
committerZalathar <Zalathar@users.noreply.github.com>2023-12-03 12:35:33 +1100
commiteb2d4cb5414361d9148bf43388012dcbdce80abe (patch)
tree3c378a46905c8253ae97150585341eb733dd6e17 /tests/coverage/async2.cov-map
parent90e321d82a0a9c3d0e3f180d4d17541b729072e0 (diff)
downloadrust-eb2d4cb5414361d9148bf43388012dcbdce80abe.tar.gz
rust-eb2d4cb5414361d9148bf43388012dcbdce80abe.zip
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.
Diffstat (limited to 'tests/coverage/async2.cov-map')
-rw-r--r--tests/coverage/async2.cov-map12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/coverage/async2.cov-map b/tests/coverage/async2.cov-map
index cc7aed9aee3..23f26ee4e5f 100644
--- a/tests/coverage/async2.cov-map
+++ b/tests/coverage/async2.cov-map
@@ -78,28 +78,28 @@ Number of file 0 mappings: 6
     = ((c0 + c1) - c1)
 
 Function name: async2::executor::block_on::VTABLE::{closure#0}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 2b, 11, 00, 33]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 2b, 11, 00, 31]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 43, 17) to (start + 0, 51)
+- Code(Counter(0)) at (prev + 43, 17) to (start + 0, 49)
 
 Function name: async2::executor::block_on::VTABLE::{closure#1}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 2c, 11, 00, 33]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 2c, 11, 00, 31]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 44, 17) to (start + 0, 51)
+- Code(Counter(0)) at (prev + 44, 17) to (start + 0, 49)
 
 Function name: async2::executor::block_on::VTABLE::{closure#2}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 2d, 11, 00, 33]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 2d, 11, 00, 31]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 45, 17) to (start + 0, 51)
+- Code(Counter(0)) at (prev + 45, 17) to (start + 0, 49)
 
 Function name: async2::executor::block_on::VTABLE::{closure#3}
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 2e, 11, 00, 13]