Skip to content

Commit e80a3e2

Browse files
committed
coverage: Tweak tests/coverage/assert-ne.rs
This test is intended to demonstrate that a particular macro-argument span doesn't get lost during span-refinement, but it turns out that span-extraction currently doesn't yield any MIR spans for this position. This patch therefore tweaks the test to add a function call in that position, so that it still remains relevant to span refinement.
1 parent 0b45675 commit e80a3e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: tests/coverage/assert-ne.coverage

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
LL| |
88
LL| 1|fn main() {
99
LL| 1| assert_ne!(
10-
LL| 1| Foo(5), // Make sure this expression's span isn't lost.
10+
LL| 1| black_box(Foo(5)), // Make sure this expression's span isn't lost.
1111
LL| 1| if black_box(false) {
1212
LL| 0| Foo(0) //
1313
LL| | } else {

Diff for: tests/coverage/assert-ne.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ struct Foo(u32);
77

88
fn main() {
99
assert_ne!(
10-
Foo(5), // Make sure this expression's span isn't lost.
10+
black_box(Foo(5)), // Make sure this expression's span isn't lost.
1111
if black_box(false) {
1212
Foo(0) //
1313
} else {

0 commit comments

Comments
 (0)