Skip to content

Commit dbf5ae3

Browse files
committed
Add reference annotations for the coverage attribute
1 parent a52085d commit dbf5ae3

27 files changed

+123
-103
lines changed

tests/coverage/attr/impl.cov-map

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
Function name: <impl::MyStruct>::off_on (unused)
2-
Raw bytes (9): 0x[01, 01, 00, 01, 00, 0d, 05, 00, 13]
2+
Raw bytes (9): 0x[01, 01, 00, 01, 00, 0e, 05, 00, 13]
33
Number of files: 1
44
- file 0 => global file 1
55
Number of expressions: 0
66
Number of file 0 mappings: 1
7-
- Code(Zero) at (prev + 13, 5) to (start + 0, 19)
7+
- Code(Zero) at (prev + 14, 5) to (start + 0, 19)
88
Highest counter ID seen: (none)
99

1010
Function name: <impl::MyStruct>::on_inherit (unused)
11-
Raw bytes (9): 0x[01, 01, 00, 01, 00, 15, 05, 00, 17]
11+
Raw bytes (9): 0x[01, 01, 00, 01, 00, 16, 05, 00, 17]
1212
Number of files: 1
1313
- file 0 => global file 1
1414
Number of expressions: 0
1515
Number of file 0 mappings: 1
16-
- Code(Zero) at (prev + 21, 5) to (start + 0, 23)
16+
- Code(Zero) at (prev + 22, 5) to (start + 0, 23)
1717
Highest counter ID seen: (none)
1818

1919
Function name: <impl::MyStruct>::on_on (unused)
20-
Raw bytes (9): 0x[01, 01, 00, 01, 00, 18, 05, 00, 12]
20+
Raw bytes (9): 0x[01, 01, 00, 01, 00, 19, 05, 00, 12]
2121
Number of files: 1
2222
- file 0 => global file 1
2323
Number of expressions: 0
2424
Number of file 0 mappings: 1
25-
- Code(Zero) at (prev + 24, 5) to (start + 0, 18)
25+
- Code(Zero) at (prev + 25, 5) to (start + 0, 18)
2626
Highest counter ID seen: (none)
2727

tests/coverage/attr/impl.coverage

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
LL| |//@ edition: 2021
2+
LL| |//@ reference: attributes.coverage.nesting
23
LL| |
34
LL| |// Checks that `#[coverage(..)]` can be applied to impl and impl-trait blocks,
45
LL| |// and is inherited by any enclosed functions.

tests/coverage/attr/impl.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ edition: 2021
2+
//@ reference: attributes.coverage.nesting
23

34
// Checks that `#[coverage(..)]` can be applied to impl and impl-trait blocks,
45
// and is inherited by any enclosed functions.

tests/coverage/attr/module.cov-map

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
Function name: module::off::on (unused)
2-
Raw bytes (9): 0x[01, 01, 00, 01, 00, 0b, 05, 00, 0f]
2+
Raw bytes (9): 0x[01, 01, 00, 01, 00, 0c, 05, 00, 0f]
33
Number of files: 1
44
- file 0 => global file 1
55
Number of expressions: 0
66
Number of file 0 mappings: 1
7-
- Code(Zero) at (prev + 11, 5) to (start + 0, 15)
7+
- Code(Zero) at (prev + 12, 5) to (start + 0, 15)
88
Highest counter ID seen: (none)
99

1010
Function name: module::on::inherit (unused)
11-
Raw bytes (9): 0x[01, 01, 00, 01, 00, 13, 05, 00, 14]
11+
Raw bytes (9): 0x[01, 01, 00, 01, 00, 14, 05, 00, 14]
1212
Number of files: 1
1313
- file 0 => global file 1
1414
Number of expressions: 0
1515
Number of file 0 mappings: 1
16-
- Code(Zero) at (prev + 19, 5) to (start + 0, 20)
16+
- Code(Zero) at (prev + 20, 5) to (start + 0, 20)
1717
Highest counter ID seen: (none)
1818

1919
Function name: module::on::on (unused)
20-
Raw bytes (9): 0x[01, 01, 00, 01, 00, 16, 05, 00, 0f]
20+
Raw bytes (9): 0x[01, 01, 00, 01, 00, 17, 05, 00, 0f]
2121
Number of files: 1
2222
- file 0 => global file 1
2323
Number of expressions: 0
2424
Number of file 0 mappings: 1
25-
- Code(Zero) at (prev + 22, 5) to (start + 0, 15)
25+
- Code(Zero) at (prev + 23, 5) to (start + 0, 15)
2626
Highest counter ID seen: (none)
2727

tests/coverage/attr/module.coverage

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
LL| |//@ edition: 2021
2+
LL| |//@ reference: attributes.coverage.nesting
23
LL| |
34
LL| |// Checks that `#[coverage(..)]` can be applied to modules, and is inherited
45
LL| |// by any enclosed functions.

tests/coverage/attr/module.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ edition: 2021
2+
//@ reference: attributes.coverage.nesting
23

34
// Checks that `#[coverage(..)]` can be applied to modules, and is inherited
45
// by any enclosed functions.

tests/coverage/attr/nested.cov-map

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
Function name: nested::closure_expr
2-
Raw bytes (14): 0x[01, 01, 00, 02, 01, 3f, 01, 01, 0f, 01, 0b, 05, 01, 02]
2+
Raw bytes (14): 0x[01, 01, 00, 02, 01, 40, 01, 01, 0f, 01, 0b, 05, 01, 02]
33
Number of files: 1
44
- file 0 => global file 1
55
Number of expressions: 0
66
Number of file 0 mappings: 2
7-
- Code(Counter(0)) at (prev + 63, 1) to (start + 1, 15)
7+
- Code(Counter(0)) at (prev + 64, 1) to (start + 1, 15)
88
- Code(Counter(0)) at (prev + 11, 5) to (start + 1, 2)
99
Highest counter ID seen: c0
1010

1111
Function name: nested::closure_tail
12-
Raw bytes (14): 0x[01, 01, 00, 02, 01, 4e, 01, 01, 0f, 01, 11, 05, 01, 02]
12+
Raw bytes (14): 0x[01, 01, 00, 02, 01, 4f, 01, 01, 0f, 01, 11, 05, 01, 02]
1313
Number of files: 1
1414
- file 0 => global file 1
1515
Number of expressions: 0
1616
Number of file 0 mappings: 2
17-
- Code(Counter(0)) at (prev + 78, 1) to (start + 1, 15)
17+
- Code(Counter(0)) at (prev + 79, 1) to (start + 1, 15)
1818
- Code(Counter(0)) at (prev + 17, 5) to (start + 1, 2)
1919
Highest counter ID seen: c0
2020

tests/coverage/attr/nested.coverage

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
LL| |#![feature(stmt_expr_attributes)]
22
LL| |//@ edition: 2021
3+
LL| |//@ reference: attributes.coverage.nesting
34
LL| |
45
LL| |// Demonstrates the interaction between #[coverage(off)] and various kinds of
56
LL| |// nested function.

tests/coverage/attr/nested.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![feature(stmt_expr_attributes)]
22
//@ edition: 2021
3+
//@ reference: attributes.coverage.nesting
34

45
// Demonstrates the interaction between #[coverage(off)] and various kinds of
56
// nested function.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
Function name: off_on_sandwich::dense_a::dense_b
2-
Raw bytes (14): 0x[01, 01, 00, 02, 01, 0e, 05, 02, 12, 01, 07, 05, 00, 06]
2+
Raw bytes (14): 0x[01, 01, 00, 02, 01, 0f, 05, 02, 12, 01, 07, 05, 00, 06]
33
Number of files: 1
44
- file 0 => global file 1
55
Number of expressions: 0
66
Number of file 0 mappings: 2
7-
- Code(Counter(0)) at (prev + 14, 5) to (start + 2, 18)
7+
- Code(Counter(0)) at (prev + 15, 5) to (start + 2, 18)
88
- Code(Counter(0)) at (prev + 7, 5) to (start + 0, 6)
99
Highest counter ID seen: c0
1010

1111
Function name: off_on_sandwich::sparse_a::sparse_b::sparse_c
12-
Raw bytes (14): 0x[01, 01, 00, 02, 01, 20, 09, 02, 17, 01, 0b, 09, 00, 0a]
12+
Raw bytes (14): 0x[01, 01, 00, 02, 01, 21, 09, 02, 17, 01, 0b, 09, 00, 0a]
1313
Number of files: 1
1414
- file 0 => global file 1
1515
Number of expressions: 0
1616
Number of file 0 mappings: 2
17-
- Code(Counter(0)) at (prev + 32, 9) to (start + 2, 23)
17+
- Code(Counter(0)) at (prev + 33, 9) to (start + 2, 23)
1818
- Code(Counter(0)) at (prev + 11, 9) to (start + 0, 10)
1919
Highest counter ID seen: c0
2020

2121
Function name: off_on_sandwich::sparse_a::sparse_b::sparse_c::sparse_d
22-
Raw bytes (14): 0x[01, 01, 00, 02, 01, 23, 0d, 02, 1b, 01, 07, 0d, 00, 0e]
22+
Raw bytes (14): 0x[01, 01, 00, 02, 01, 24, 0d, 02, 1b, 01, 07, 0d, 00, 0e]
2323
Number of files: 1
2424
- file 0 => global file 1
2525
Number of expressions: 0
2626
Number of file 0 mappings: 2
27-
- Code(Counter(0)) at (prev + 35, 13) to (start + 2, 27)
27+
- Code(Counter(0)) at (prev + 36, 13) to (start + 2, 27)
2828
- Code(Counter(0)) at (prev + 7, 13) to (start + 0, 14)
2929
Highest counter ID seen: c0
3030

0 commit comments

Comments
 (0)