about summary refs log tree commit diff
path: root/tests/coverage/assert-ne.coverage
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-12 15:58:32 +0000
committerbors <bors@rust-lang.org>2024-06-12 15:58:32 +0000
commit1d43fbbc7348f2bd9260d8532bffa02f5bd2c9ac (patch)
treebc04e04a2b07e4e511bb28453ca6adc0fc516191 /tests/coverage/assert-ne.coverage
parent0285dab54f87120367f5693174136aff24b74640 (diff)
parent5d22e7a8813f6a584eb7415cb78182b52ff71e12 (diff)
downloadrust-1d43fbbc7348f2bd9260d8532bffa02f5bd2c9ac.tar.gz
rust-1d43fbbc7348f2bd9260d8532bffa02f5bd2c9ac.zip
Auto merge of #126332 - GuillaumeGomez:rollup-bu1q4pz, r=GuillaumeGomez
Rollup of 9 pull requests

Successful merges:

 - #126039 (Promote `arm64ec-pc-windows-msvc` to tier 2)
 - #126075 (Remove `DebugWithInfcx` machinery)
 - #126228 (Provide correct parent for nested anon const)
 - #126232 (interpret: dyn trait metadata check: equate traits in a proper way)
 - #126242 (Simplify provider api to improve llvm ir)
 - #126294 (coverage: Replace the old span refiner with a single function)
 - #126295 (No uninitalized report in a pre-returned match arm)
 - #126312 (Update `rustc-perf` submodule)
 - #126322 (Follow up to splitting core's PanicInfo and std's PanicInfo)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/coverage/assert-ne.coverage')
-rw-r--r--tests/coverage/assert-ne.coverage23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/coverage/assert-ne.coverage b/tests/coverage/assert-ne.coverage
new file mode 100644
index 00000000000..236a8fd1385
--- /dev/null
+++ b/tests/coverage/assert-ne.coverage
@@ -0,0 +1,23 @@
+   LL|       |//@ edition: 2021
+   LL|       |
+   LL|       |use core::hint::black_box;
+   LL|       |
+   LL|       |#[derive(Debug, PartialEq)]
+   LL|       |struct Foo(u32);
+   LL|       |
+   LL|      1|fn main() {
+   LL|      1|    assert_ne!(
+   LL|      1|        Foo(5), // Make sure this expression's span isn't lost.
+   LL|      1|        if black_box(false) {
+   LL|      0|            Foo(0) //
+   LL|       |        } else {
+   LL|      1|            Foo(1) //
+   LL|       |        }
+   LL|       |    );
+   LL|      1|    ()
+   LL|      1|}
+   LL|       |
+   LL|       |// This test is a short fragment extracted from `issue-84561.rs`, highlighting
+   LL|       |// a particular span of code that can easily be lost if overlapping spans are
+   LL|       |// processed incorrectly.
+