summaryrefslogtreecommitdiffstats
path: root/tests/run-coverage/partial_eq.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/run-coverage/partial_eq.rs
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/run-coverage/partial_eq.rs46
1 files changed, 0 insertions, 46 deletions
diff --git a/tests/run-coverage/partial_eq.rs b/tests/run-coverage/partial_eq.rs
deleted file mode 100644
index dd8b42c18..000000000
--- a/tests/run-coverage/partial_eq.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-// This test confirms an earlier problem was resolved, supporting the MIR graph generated by the
-// structure of this test.
-
-#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
-pub struct Version {
- major: usize,
- minor: usize,
- patch: usize,
-}
-
-impl Version {
- pub fn new(major: usize, minor: usize, patch: usize) -> Self {
- Self {
- major,
- minor,
- patch,
- }
- }
-}
-
-fn main() {
- let version_3_2_1 = Version::new(3, 2, 1);
- let version_3_3_0 = Version::new(3, 3, 0);
-
- println!("{:?} < {:?} = {}", version_3_2_1, version_3_3_0, version_3_2_1 < version_3_3_0);
-}
-
-/*
-
-This test verifies a bug was fixed that otherwise generated this error:
-
-thread 'rustc' panicked at 'No counters provided the source_hash for function:
- Instance {
- def: Item(WithOptConstParam {
- did: DefId(0:101 ~ autocfg[c44a]::version::{impl#2}::partial_cmp),
- const_param_did: None
- }),
- args: []
- }'
-The `PartialOrd` derived by `Version` happened to generate a MIR that generated coverage
-without a code region associated with any `Counter`. Code regions were associated with at least
-one expression, which is allowed, but the `function_source_hash` was only passed to the codegen
-(coverage mapgen) phase from a `Counter`s code region. A new method was added to pass the
-`function_source_hash` without a code region, if necessary.
-
-*/