coverage: Treat await similar to a macro
Currently `await` is only counted towards coverage if the containing function is suspended and resumed at least once. This is because it expands to code which contains a branch on the discriminant of `Poll`. By treating it like a branching macro (e.g. `assert!`), these implementation details will be hidden from the coverage results.
This commit is contained in:
parent
3446ca535e
commit
25d183057e
8 changed files with 68 additions and 72 deletions
|
@ -92,20 +92,18 @@ Number of file 0 mappings: 1
|
|||
- Code(Counter(0)) at (prev + 25, 1) to (start + 0, 23)
|
||||
|
||||
Function name: async::g::{closure#0} (unused)
|
||||
Raw bytes (69): 0x[01, 01, 00, 0d, 00, 19, 17, 01, 0c, 00, 02, 09, 00, 0a, 00, 00, 0e, 00, 11, 00, 00, 12, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 09, 00, 0a, 00, 00, 0e, 00, 11, 00, 00, 12, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02]
|
||||
Raw bytes (59): 0x[01, 01, 00, 0b, 00, 19, 17, 01, 0c, 00, 02, 09, 00, 0a, 00, 00, 0e, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 09, 00, 0a, 00, 00, 0e, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02]
|
||||
Number of files: 1
|
||||
- file 0 => global file 1
|
||||
Number of expressions: 0
|
||||
Number of file 0 mappings: 13
|
||||
Number of file 0 mappings: 11
|
||||
- Code(Zero) at (prev + 25, 23) to (start + 1, 12)
|
||||
- Code(Zero) at (prev + 2, 9) to (start + 0, 10)
|
||||
- Code(Zero) at (prev + 0, 14) to (start + 0, 17)
|
||||
- Code(Zero) at (prev + 0, 18) to (start + 0, 23)
|
||||
- Code(Zero) at (prev + 0, 14) to (start + 0, 23)
|
||||
- Code(Zero) at (prev + 0, 27) to (start + 0, 28)
|
||||
- Code(Zero) at (prev + 0, 32) to (start + 0, 34)
|
||||
- Code(Zero) at (prev + 1, 9) to (start + 0, 10)
|
||||
- Code(Zero) at (prev + 0, 14) to (start + 0, 17)
|
||||
- Code(Zero) at (prev + 0, 18) to (start + 0, 23)
|
||||
- Code(Zero) at (prev + 0, 14) to (start + 0, 23)
|
||||
- Code(Zero) at (prev + 0, 27) to (start + 0, 28)
|
||||
- Code(Zero) at (prev + 0, 32) to (start + 0, 34)
|
||||
- Code(Zero) at (prev + 1, 14) to (start + 0, 16)
|
||||
|
@ -120,15 +118,14 @@ Number of file 0 mappings: 1
|
|||
- Code(Counter(0)) at (prev + 33, 1) to (start + 0, 22)
|
||||
|
||||
Function name: async::h::{closure#0} (unused)
|
||||
Raw bytes (44): 0x[01, 01, 00, 08, 00, 21, 16, 03, 0c, 00, 04, 09, 00, 0a, 00, 00, 0e, 00, 13, 00, 00, 14, 00, 19, 00, 00, 1a, 00, 1b, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02]
|
||||
Raw bytes (39): 0x[01, 01, 00, 07, 00, 21, 16, 03, 0c, 00, 04, 09, 00, 0a, 00, 00, 0e, 00, 19, 00, 00, 1a, 00, 1b, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02]
|
||||
Number of files: 1
|
||||
- file 0 => global file 1
|
||||
Number of expressions: 0
|
||||
Number of file 0 mappings: 8
|
||||
Number of file 0 mappings: 7
|
||||
- Code(Zero) at (prev + 33, 22) to (start + 3, 12)
|
||||
- Code(Zero) at (prev + 4, 9) to (start + 0, 10)
|
||||
- Code(Zero) at (prev + 0, 14) to (start + 0, 19)
|
||||
- Code(Zero) at (prev + 0, 20) to (start + 0, 25)
|
||||
- Code(Zero) at (prev + 0, 14) to (start + 0, 25)
|
||||
- Code(Zero) at (prev + 0, 26) to (start + 0, 27)
|
||||
- Code(Zero) at (prev + 0, 32) to (start + 0, 34)
|
||||
- Code(Zero) at (prev + 1, 14) to (start + 0, 16)
|
||||
|
@ -143,28 +140,25 @@ Number of file 0 mappings: 1
|
|||
- Code(Counter(0)) at (prev + 42, 1) to (start + 0, 19)
|
||||
|
||||
Function name: async::i::{closure#0}
|
||||
Raw bytes (78): 0x[01, 01, 02, 07, 21, 19, 1d, 0e, 01, 2a, 13, 04, 0c, 0d, 05, 09, 00, 0a, 01, 00, 0e, 00, 12, 05, 00, 13, 00, 18, 09, 00, 1c, 00, 21, 0d, 00, 27, 00, 2a, 15, 00, 2b, 00, 30, 1d, 01, 09, 00, 0a, 11, 00, 0e, 00, 11, 25, 00, 12, 00, 17, 29, 00, 1b, 00, 20, 1d, 00, 24, 00, 26, 21, 01, 0e, 00, 10, 03, 02, 01, 00, 02]
|
||||
Raw bytes (63): 0x[01, 01, 02, 07, 19, 11, 15, 0b, 01, 2a, 13, 04, 0c, 09, 05, 09, 00, 0a, 01, 00, 0e, 00, 18, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 30, 15, 01, 09, 00, 0a, 0d, 00, 0e, 00, 17, 1d, 00, 1b, 00, 20, 15, 00, 24, 00, 26, 19, 01, 0e, 00, 10, 03, 02, 01, 00, 02]
|
||||
Number of files: 1
|
||||
- file 0 => global file 1
|
||||
Number of expressions: 2
|
||||
- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(8)
|
||||
- expression 1 operands: lhs = Counter(6), rhs = Counter(7)
|
||||
Number of file 0 mappings: 14
|
||||
- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(6)
|
||||
- expression 1 operands: lhs = Counter(4), rhs = Counter(5)
|
||||
Number of file 0 mappings: 11
|
||||
- Code(Counter(0)) at (prev + 42, 19) to (start + 4, 12)
|
||||
- Code(Counter(3)) at (prev + 5, 9) to (start + 0, 10)
|
||||
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 18)
|
||||
- Code(Counter(1)) at (prev + 0, 19) to (start + 0, 24)
|
||||
- Code(Counter(2)) at (prev + 0, 28) to (start + 0, 33)
|
||||
- Code(Counter(3)) at (prev + 0, 39) to (start + 0, 42)
|
||||
- Code(Counter(5)) at (prev + 0, 43) to (start + 0, 48)
|
||||
- Code(Counter(7)) at (prev + 1, 9) to (start + 0, 10)
|
||||
- Code(Counter(4)) at (prev + 0, 14) to (start + 0, 17)
|
||||
- Code(Counter(9)) at (prev + 0, 18) to (start + 0, 23)
|
||||
- Code(Counter(10)) at (prev + 0, 27) to (start + 0, 32)
|
||||
- Code(Counter(7)) at (prev + 0, 36) to (start + 0, 38)
|
||||
- Code(Counter(8)) at (prev + 1, 14) to (start + 0, 16)
|
||||
- Code(Counter(2)) at (prev + 5, 9) to (start + 0, 10)
|
||||
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 24)
|
||||
- Code(Counter(1)) at (prev + 0, 28) to (start + 0, 33)
|
||||
- Code(Counter(2)) at (prev + 0, 39) to (start + 0, 48)
|
||||
- Code(Counter(5)) at (prev + 1, 9) to (start + 0, 10)
|
||||
- Code(Counter(3)) at (prev + 0, 14) to (start + 0, 23)
|
||||
- Code(Counter(7)) at (prev + 0, 27) to (start + 0, 32)
|
||||
- Code(Counter(5)) at (prev + 0, 36) to (start + 0, 38)
|
||||
- Code(Counter(6)) at (prev + 1, 14) to (start + 0, 16)
|
||||
- Code(Expression(0, Add)) at (prev + 2, 1) to (start + 0, 2)
|
||||
= ((c6 + c7) + c8)
|
||||
= ((c4 + c5) + c6)
|
||||
|
||||
Function name: async::j
|
||||
Raw bytes (58): 0x[01, 01, 02, 07, 0d, 05, 09, 0a, 01, 35, 01, 00, 0d, 01, 0b, 0b, 00, 0c, 05, 01, 09, 00, 0a, 01, 00, 0e, 00, 1b, 05, 00, 1f, 00, 27, 09, 01, 09, 00, 0a, 11, 00, 0e, 00, 1a, 09, 00, 1e, 00, 20, 0d, 01, 0e, 00, 10, 03, 02, 01, 00, 02]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue