Skip to content

Commit b2b48b3

Browse files
Auto merge of #149044 - clubby789:implicit-return-span, r=<try>
Use a more accurate span for the implicit block return assignment
2 parents 217cb73 + 571b156 commit b2b48b3

File tree

93 files changed

+1247
-905
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1247
-905
lines changed

compiler/rustc_mir_build/src/builder/block.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,11 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
334334
{
335335
// We only want to assign an implicit `()` as the return value of the block if the
336336
// block does not diverge. (Otherwise, we may try to assign a unit to a `!`-type.)
337+
// Shrink the span to the tail of the block to avoid confusing diagnostics highlighting the entire block
338+
let source_info = SourceInfo {
339+
span: this.tcx.sess.source_map().end_point(source_info.span),
340+
..source_info
341+
};
337342
this.cfg.push_assign_unit(block, source_info, destination, this.tcx);
338343
}
339344
}

tests/coverage-run-rustdoc/doctest.coverage

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ $DIR/doctest.rs:
2020
LL| 1|//! if true {
2121
LL| |//! // this is executed!
2222
LL| 1|//! assert_eq!(1, 1);
23-
LL| |//! } else {
23+
LL| 1|//! } else {
2424
LL| |//! // this is not!
2525
LL| 0|//! assert_eq!(1, 2);
26-
LL| |//! }
26+
LL| 0|//! }
2727
LL| 1|//! ```
2828
LL| |//!
2929
LL| |//! doctest testing external code:
@@ -41,17 +41,15 @@ $DIR/doctest.rs:
4141
LL| 1|//! let mut res = Err(SomeError { msg: String::from("a message") });
4242
LL| 1|//! if res.is_ok() {
4343
LL| 0|//! res?;
44-
LL| |//! } else {
44+
LL| 0|//! } else {
4545
LL| 1|//! if *res.as_ref().unwrap_err() == *res.as_ref().unwrap_err() {
4646
LL| 1|//! println!("{:?}", res);
4747
LL| 1|//! }
48-
^0
4948
LL| 1|//! if *res.as_ref().unwrap_err() == *res.as_ref().unwrap_err() {
5049
LL| 1|//! res = Ok(1);
5150
LL| 1|//! }
52-
^0
5351
LL| 1|//! res = Ok(0);
54-
LL| |//! }
52+
LL| 1|//! }
5553
LL| |//! // need to be explicit because rustdoc cant infer the return type
5654
LL| 1|//! Ok::<(), SomeError>(())
5755
LL| 1|//! ```
@@ -89,9 +87,9 @@ $DIR/doctest.rs:
8987
LL| 1|fn main() {
9088
LL| 1| if true {
9189
LL| 1| assert_eq!(1, 1);
92-
LL| | } else {
90+
LL| 1| } else {
9391
LL| 0| assert_eq!(1, 2);
94-
LL| | }
92+
LL| 0| }
9593
LL| 1|}
9694
LL| |
9795
LL| |// FIXME(Swatinem): Fix known issue that coverage code region columns need to be offset by the

tests/coverage/abort.cov-map

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Function name: abort::main
2-
Raw bytes (98): 0x[01, 01, 07, 05, 01, 05, 0b, 01, 09, 05, 13, 01, 0d, 05, 1b, 01, 11, 10, 01, 0d, 01, 00, 1c, 01, 01, 09, 00, 16, 01, 00, 19, 00, 1b, 05, 01, 0b, 00, 18, 02, 01, 0c, 00, 19, 09, 00, 1a, 02, 0a, 06, 02, 09, 00, 0a, 02, 02, 0c, 00, 19, 0d, 00, 1a, 00, 31, 0e, 00, 30, 00, 31, 02, 04, 0c, 00, 19, 11, 00, 1a, 00, 31, 16, 00, 30, 00, 31, 02, 01, 09, 00, 17, 01, 02, 05, 00, 0b, 01, 01, 01, 00, 02]
2+
Raw bytes (118): 0x[01, 01, 07, 05, 01, 05, 0b, 01, 09, 05, 13, 01, 0d, 05, 1b, 01, 11, 14, 01, 0d, 01, 00, 1c, 01, 01, 09, 00, 16, 01, 00, 19, 00, 1b, 05, 01, 0b, 00, 18, 02, 01, 0c, 00, 19, 09, 01, 0d, 00, 18, 09, 01, 09, 00, 0a, 06, 00, 09, 00, 0a, 02, 02, 0c, 00, 19, 0d, 00, 1c, 00, 27, 0d, 00, 30, 00, 31, 0e, 00, 30, 00, 31, 02, 04, 0c, 00, 19, 11, 00, 1c, 00, 27, 11, 00, 30, 00, 31, 16, 00, 30, 00, 31, 02, 01, 09, 00, 17, 02, 01, 05, 00, 06, 01, 01, 05, 00, 0b, 01, 01, 01, 00, 02]
33
Number of files: 1
44
- file 0 => $DIR/abort.rs
55
Number of expressions: 7
@@ -10,46 +10,53 @@ Number of expressions: 7
1010
- expression 4 operands: lhs = Counter(0), rhs = Counter(3)
1111
- expression 5 operands: lhs = Counter(1), rhs = Expression(6, Add)
1212
- expression 6 operands: lhs = Counter(0), rhs = Counter(4)
13-
Number of file 0 mappings: 16
13+
Number of file 0 mappings: 20
1414
- Code(Counter(0)) at (prev + 13, 1) to (start + 0, 28)
1515
- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22)
1616
- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 27)
1717
- Code(Counter(1)) at (prev + 1, 11) to (start + 0, 24)
1818
- Code(Expression(0, Sub)) at (prev + 1, 12) to (start + 0, 25)
1919
= (c1 - c0)
20-
- Code(Counter(2)) at (prev + 0, 26) to (start + 2, 10)
21-
- Code(Expression(1, Sub)) at (prev + 2, 9) to (start + 0, 10)
20+
- Code(Counter(2)) at (prev + 1, 13) to (start + 0, 24)
21+
- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 10)
22+
- Code(Expression(1, Sub)) at (prev + 0, 9) to (start + 0, 10)
2223
= (c1 - (c0 + c2))
2324
- Code(Expression(0, Sub)) at (prev + 2, 12) to (start + 0, 25)
2425
= (c1 - c0)
25-
- Code(Counter(3)) at (prev + 0, 26) to (start + 0, 49)
26+
- Code(Counter(3)) at (prev + 0, 28) to (start + 0, 39)
27+
- Code(Counter(3)) at (prev + 0, 48) to (start + 0, 49)
2628
- Code(Expression(3, Sub)) at (prev + 0, 48) to (start + 0, 49)
2729
= (c1 - (c0 + c3))
2830
- Code(Expression(0, Sub)) at (prev + 4, 12) to (start + 0, 25)
2931
= (c1 - c0)
30-
- Code(Counter(4)) at (prev + 0, 26) to (start + 0, 49)
32+
- Code(Counter(4)) at (prev + 0, 28) to (start + 0, 39)
33+
- Code(Counter(4)) at (prev + 0, 48) to (start + 0, 49)
3134
- Code(Expression(5, Sub)) at (prev + 0, 48) to (start + 0, 49)
3235
= (c1 - (c0 + c4))
3336
- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 23)
3437
= (c1 - c0)
35-
- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 11)
38+
- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6)
39+
= (c1 - c0)
40+
- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 11)
3641
- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
3742
Highest counter ID seen: c4
3843

3944
Function name: abort::might_abort
40-
Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 03, 01, 00, 2e, 01, 01, 08, 00, 14, 05, 01, 09, 00, 11, 05, 01, 09, 00, 0f, 02, 01, 0c, 02, 06, 02, 03, 01, 00, 02]
45+
Raw bytes (41): 0x[01, 01, 01, 01, 05, 07, 01, 03, 01, 00, 2e, 01, 01, 08, 00, 14, 05, 01, 09, 00, 11, 05, 01, 09, 00, 0f, 02, 02, 09, 00, 11, 02, 01, 05, 00, 06, 02, 01, 01, 00, 02]
4146
Number of files: 1
4247
- file 0 => $DIR/abort.rs
4348
Number of expressions: 1
4449
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
45-
Number of file 0 mappings: 6
50+
Number of file 0 mappings: 7
4651
- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 46)
4752
- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 20)
4853
- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 17)
4954
- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 15)
50-
- Code(Expression(0, Sub)) at (prev + 1, 12) to (start + 2, 6)
55+
- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 17)
56+
= (c0 - c1)
57+
- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6)
5158
= (c0 - c1)
52-
- Code(Expression(0, Sub)) at (prev + 3, 1) to (start + 0, 2)
59+
- Code(Expression(0, Sub)) at (prev + 1, 1) to (start + 0, 2)
5360
= (c0 - c1)
5461
Highest counter ID seen: c1
5562

tests/coverage/abort.coverage

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
LL| 12| if should_abort {
55
LL| 0| println!("aborting...");
66
LL| 0| panic!("panics and aborts");
7-
LL| 12| } else {
7+
LL| | } else {
88
LL| 12| println!("Don't Panic");
99
LL| 12| }
1010
LL| 12|}
@@ -15,17 +15,17 @@
1515
LL| 11| while countdown > 0 {
1616
LL| 10| if countdown < 5 {
1717
LL| 4| might_abort(false);
18-
LL| 6| }
18+
LL| 10| }
1919
LL| | // See discussion (below the `Notes` section) on coverage results for the closing brace.
2020
LL| 10| if countdown < 5 { might_abort(false); } // Counts for different regions on one line.
21-
^4 ^6
21+
^4
2222
LL| | // For the following example, the closing brace is the last character on the line.
2323
LL| | // This shows the character after the closing brace is highlighted, even if that next
2424
LL| | // character is a newline.
2525
LL| 10| if countdown < 5 { might_abort(false); }
26-
^4 ^6
26+
^4
2727
LL| 10| countdown -= 1;
28-
LL| | }
28+
LL| 10| }
2929
LL| 1| Ok(())
3030
LL| 1|}
3131
LL| |

tests/coverage/assert.cov-map

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Function name: assert::main
2-
Raw bytes (76): 0x[01, 01, 06, 05, 01, 05, 17, 01, 09, 05, 13, 17, 0d, 01, 09, 0c, 01, 09, 01, 00, 1c, 01, 01, 09, 00, 16, 01, 00, 19, 00, 1b, 05, 01, 0b, 00, 18, 02, 01, 0c, 00, 1a, 09, 00, 1b, 02, 0a, 06, 02, 13, 00, 20, 0d, 00, 21, 02, 0a, 0e, 02, 09, 00, 0a, 02, 01, 09, 00, 17, 01, 02, 05, 00, 0b, 01, 01, 01, 00, 02]
2+
Raw bytes (91): 0x[01, 01, 06, 05, 01, 05, 17, 01, 09, 05, 13, 17, 0d, 01, 09, 0f, 01, 09, 01, 00, 1c, 01, 01, 09, 00, 16, 01, 00, 19, 00, 1b, 05, 01, 0b, 00, 18, 02, 01, 0c, 00, 1a, 09, 01, 0d, 00, 1e, 09, 01, 09, 00, 0a, 06, 00, 13, 00, 20, 0d, 01, 0d, 00, 1e, 0d, 01, 09, 00, 0a, 0e, 00, 09, 00, 0a, 02, 01, 09, 00, 17, 02, 01, 05, 00, 06, 01, 01, 05, 00, 0b, 01, 01, 01, 00, 02]
33
Number of files: 1
44
- file 0 => $DIR/assert.rs
55
Number of expressions: 6
@@ -9,22 +9,26 @@ Number of expressions: 6
99
- expression 3 operands: lhs = Counter(1), rhs = Expression(4, Add)
1010
- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
1111
- expression 5 operands: lhs = Counter(0), rhs = Counter(2)
12-
Number of file 0 mappings: 12
12+
Number of file 0 mappings: 15
1313
- Code(Counter(0)) at (prev + 9, 1) to (start + 0, 28)
1414
- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22)
1515
- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 27)
1616
- Code(Counter(1)) at (prev + 1, 11) to (start + 0, 24)
1717
- Code(Expression(0, Sub)) at (prev + 1, 12) to (start + 0, 26)
1818
= (c1 - c0)
19-
- Code(Counter(2)) at (prev + 0, 27) to (start + 2, 10)
20-
- Code(Expression(1, Sub)) at (prev + 2, 19) to (start + 0, 32)
19+
- Code(Counter(2)) at (prev + 1, 13) to (start + 0, 30)
20+
- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 10)
21+
- Code(Expression(1, Sub)) at (prev + 0, 19) to (start + 0, 32)
2122
= (c1 - (c0 + c2))
22-
- Code(Counter(3)) at (prev + 0, 33) to (start + 2, 10)
23-
- Code(Expression(3, Sub)) at (prev + 2, 9) to (start + 0, 10)
23+
- Code(Counter(3)) at (prev + 1, 13) to (start + 0, 30)
24+
- Code(Counter(3)) at (prev + 1, 9) to (start + 0, 10)
25+
- Code(Expression(3, Sub)) at (prev + 0, 9) to (start + 0, 10)
2426
= (c1 - ((c0 + c2) + c3))
2527
- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 23)
2628
= (c1 - c0)
27-
- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 11)
29+
- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6)
30+
= (c1 - c0)
31+
- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 11)
2832
- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
2933
Highest counter ID seen: c3
3034

tests/coverage/assert.coverage

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
LL| 9| if countdown == 1 {
1313
LL| 1| might_fail_assert(3);
1414
LL| 8| } else if countdown < 5 {
15+
^1
1516
LL| 3| might_fail_assert(2);
16-
LL| 5| }
17+
LL| 8| }
1718
LL| 9| countdown -= 1;
18-
LL| | }
19+
LL| 9| }
1920
LL| 1| Ok(())
2021
LL| 1|}
2122
LL| |

tests/coverage/async.cov-map

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,21 +166,22 @@ Number of file 0 mappings: 1
166166
Highest counter ID seen: c0
167167

168168
Function name: async::i::{closure#0}
169-
Raw bytes (75): 0x[01, 01, 03, 05, 09, 11, 15, 0d, 11, 0d, 01, 2c, 13, 00, 14, 01, 04, 0b, 00, 0c, 09, 01, 09, 00, 0a, 01, 00, 0e, 00, 0f, 01, 00, 0e, 00, 18, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 30, 15, 01, 09, 00, 0a, 02, 00, 0e, 00, 17, 11, 00, 1b, 00, 20, 15, 00, 24, 00, 26, 06, 01, 0e, 00, 10, 0b, 02, 01, 00, 02]
169+
Raw bytes (80): 0x[01, 01, 03, 05, 09, 11, 15, 0d, 11, 0e, 01, 2c, 13, 00, 14, 01, 04, 0b, 00, 0c, 09, 01, 09, 00, 0a, 01, 00, 0e, 00, 0f, 01, 00, 0e, 00, 18, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 30, 0d, 00, 32, 00, 33, 15, 01, 09, 00, 0a, 02, 00, 0e, 00, 17, 11, 00, 1b, 00, 20, 15, 00, 24, 00, 26, 06, 01, 0e, 00, 10, 0b, 02, 01, 00, 02]
170170
Number of files: 1
171171
- file 0 => $DIR/async.rs
172172
Number of expressions: 3
173173
- expression 0 operands: lhs = Counter(1), rhs = Counter(2)
174174
- expression 1 operands: lhs = Counter(4), rhs = Counter(5)
175175
- expression 2 operands: lhs = Counter(3), rhs = Counter(4)
176-
Number of file 0 mappings: 13
176+
Number of file 0 mappings: 14
177177
- Code(Counter(0)) at (prev + 44, 19) to (start + 0, 20)
178178
- Code(Counter(0)) at (prev + 4, 11) to (start + 0, 12)
179179
- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 10)
180180
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 15)
181181
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 24)
182182
- Code(Counter(1)) at (prev + 0, 28) to (start + 0, 33)
183183
- Code(Counter(2)) at (prev + 0, 39) to (start + 0, 48)
184+
- Code(Counter(3)) at (prev + 0, 50) to (start + 0, 51)
184185
- Code(Counter(5)) at (prev + 1, 9) to (start + 0, 10)
185186
- Code(Expression(0, Sub)) at (prev + 0, 14) to (start + 0, 23)
186187
= (c1 - c2)
@@ -193,20 +194,21 @@ Number of file 0 mappings: 13
193194
Highest counter ID seen: c5
194195

195196
Function name: async::j
196-
Raw bytes (65): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 0b, 01, 37, 01, 00, 0c, 01, 0b, 0b, 00, 0c, 05, 01, 09, 00, 0a, 01, 00, 0e, 00, 0f, 01, 00, 0e, 00, 1b, 05, 00, 1f, 00, 27, 09, 01, 09, 00, 0a, 02, 00, 0e, 00, 1a, 09, 00, 1e, 00, 20, 06, 01, 0e, 00, 10, 01, 02, 01, 00, 02]
197+
Raw bytes (70): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 0c, 01, 37, 01, 00, 0c, 01, 0b, 0b, 00, 0c, 05, 01, 09, 00, 0a, 01, 00, 0e, 00, 0f, 01, 00, 0e, 00, 1b, 05, 00, 21, 00, 22, 05, 00, 26, 00, 27, 09, 01, 09, 00, 0a, 02, 00, 0e, 00, 1a, 09, 00, 1e, 00, 20, 06, 01, 0e, 00, 10, 01, 02, 01, 00, 02]
197198
Number of files: 1
198199
- file 0 => $DIR/async.rs
199200
Number of expressions: 3
200201
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
201202
- expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
202203
- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
203-
Number of file 0 mappings: 11
204+
Number of file 0 mappings: 12
204205
- Code(Counter(0)) at (prev + 55, 1) to (start + 0, 12)
205206
- Code(Counter(0)) at (prev + 11, 11) to (start + 0, 12)
206207
- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 10)
207208
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 15)
208209
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 27)
209-
- Code(Counter(1)) at (prev + 0, 31) to (start + 0, 39)
210+
- Code(Counter(1)) at (prev + 0, 33) to (start + 0, 34)
211+
- Code(Counter(1)) at (prev + 0, 38) to (start + 0, 39)
210212
- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 10)
211213
- Code(Expression(0, Sub)) at (prev + 0, 14) to (start + 0, 26)
212214
= (c0 - c1)

tests/coverage/async.coverage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
LL| | // executed asynchronously.
5050
LL| 1| match x {
5151
LL| 1| y if c(x).await == y + 1 => { d().await; }
52-
^0 ^0
52+
^0 ^0 ^0
5353
LL| 1| y if f().await == y + 1 => (),
5454
^0 ^0
5555
LL| 1| _ => (),
@@ -69,7 +69,7 @@
6969
LL| 1| fn f() -> u8 { 1 }
7070
LL| 1| match x {
7171
LL| 1| y if c(x) == y + 1 => { d(); }
72-
^0 ^0
72+
^0 ^0 ^0
7373
LL| 1| y if f() == y + 1 => (),
7474
^0 ^0
7575
LL| 1| _ => (),

tests/coverage/async2.cov-map

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,19 @@ Number of file 0 mappings: 1
88
Highest counter ID seen: c0
99

1010
Function name: async2::async_func::{closure#0}
11-
Raw bytes (44): 0x[01, 01, 00, 08, 01, 0f, 17, 00, 18, 01, 01, 05, 00, 0d, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 11, 01, 01, 08, 00, 09, 01, 00, 0a, 02, 06, 00, 02, 05, 00, 06, 01, 01, 01, 00, 02]
11+
Raw bytes (49): 0x[01, 01, 00, 09, 01, 0f, 17, 00, 18, 01, 01, 05, 00, 0d, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 11, 01, 01, 08, 00, 09, 01, 01, 09, 00, 11, 01, 01, 05, 00, 06, 00, 00, 05, 00, 06, 01, 01, 01, 00, 02]
1212
Number of files: 1
1313
- file 0 => $DIR/async2.rs
1414
Number of expressions: 0
15-
Number of file 0 mappings: 8
15+
Number of file 0 mappings: 9
1616
- Code(Counter(0)) at (prev + 15, 23) to (start + 0, 24)
1717
- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13)
1818
- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
1919
- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 17)
2020
- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9)
21-
- Code(Counter(0)) at (prev + 0, 10) to (start + 2, 6)
22-
- Code(Zero) at (prev + 2, 5) to (start + 0, 6)
21+
- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17)
22+
- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6)
23+
- Code(Zero) at (prev + 0, 5) to (start + 0, 6)
2324
- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
2425
Highest counter ID seen: c0
2526

@@ -60,18 +61,19 @@ Number of file 0 mappings: 8
6061
Highest counter ID seen: c0
6162

6263
Function name: async2::non_async_func
63-
Raw bytes (44): 0x[01, 01, 00, 08, 01, 07, 01, 00, 14, 01, 01, 05, 00, 0d, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 11, 01, 01, 08, 00, 09, 01, 00, 0a, 02, 06, 00, 02, 05, 00, 06, 01, 01, 01, 00, 02]
64+
Raw bytes (49): 0x[01, 01, 00, 09, 01, 07, 01, 00, 14, 01, 01, 05, 00, 0d, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 11, 01, 01, 08, 00, 09, 01, 01, 09, 00, 11, 01, 01, 05, 00, 06, 00, 00, 05, 00, 06, 01, 01, 01, 00, 02]
6465
Number of files: 1
6566
- file 0 => $DIR/async2.rs
6667
Number of expressions: 0
67-
Number of file 0 mappings: 8
68+
Number of file 0 mappings: 9
6869
- Code(Counter(0)) at (prev + 7, 1) to (start + 0, 20)
6970
- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13)
7071
- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
7172
- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 17)
7273
- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9)
73-
- Code(Counter(0)) at (prev + 0, 10) to (start + 2, 6)
74-
- Code(Zero) at (prev + 2, 5) to (start + 0, 6)
74+
- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 17)
75+
- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6)
76+
- Code(Zero) at (prev + 0, 5) to (start + 0, 6)
7577
- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
7678
Highest counter ID seen: c0
7779

tests/coverage/async2.coverage

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
LL| 1| if b {
1111
LL| 1| println!("non_async_func println in block");
1212
LL| 1| }
13-
^0
1413
LL| 1|}
1514
LL| |
1615
LL| 1|async fn async_func() {
@@ -19,7 +18,6 @@
1918
LL| 1| if b {
2019
LL| 1| println!("async_func println in block");
2120
LL| 1| }
22-
^0
2321
LL| 1|}
2422
LL| |
2523
LL| 1|async fn async_func_just_println() {

0 commit comments

Comments
 (0)