Skip to content

Commit f2e57e9

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 928468c commit f2e57e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/coverage/assert-ne.coverage

Lines changed: 1 addition & 1 deletion
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 {

tests/coverage/assert-ne.rs

Lines changed: 1 addition & 1 deletion
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)