summaryrefslogtreecommitdiffstats
path: root/vendor/chalk-engine/src/derived.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:19 +0000
commita0b8f38ab54ac451646aa00cd5e91b6c76f22a84 (patch)
treefc451898ccaf445814e26b46664d78702178101d /vendor/chalk-engine/src/derived.rs
parentAdding debian version 1.71.1+dfsg1-2. (diff)
downloadrustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.tar.xz
rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/chalk-engine/src/derived.rs')
-rw-r--r--vendor/chalk-engine/src/derived.rs34
1 files changed, 0 insertions, 34 deletions
diff --git a/vendor/chalk-engine/src/derived.rs b/vendor/chalk-engine/src/derived.rs
deleted file mode 100644
index b3cdc3d0d..000000000
--- a/vendor/chalk-engine/src/derived.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// These impls for PartialEq, Eq, etc are written by hand. This is
-// because the `#[derive()]` would add requirements onto the context
-// object that are not needed.
-
-use super::*;
-use std::cmp::{Eq, PartialEq};
-use std::hash::{Hash, Hasher};
-use std::mem;
-
-///////////////////////////////////////////////////////////////////////////
-
-impl<I: Interner> PartialEq for Literal<I> {
- fn eq(&self, other: &Literal<I>) -> bool {
- match (self, other) {
- (Literal::Positive(goal1), Literal::Positive(goal2))
- | (Literal::Negative(goal1), Literal::Negative(goal2)) => goal1 == goal2,
-
- _ => false,
- }
- }
-}
-
-impl<I: Interner> Eq for Literal<I> {}
-
-impl<I: Interner> Hash for Literal<I> {
- fn hash<H: Hasher>(&self, state: &mut H) {
- mem::discriminant(self).hash(state);
- match self {
- Literal::Positive(goal) | Literal::Negative(goal) => {
- goal.hash(state);
- }
- }
- }
-}