iter 22b.2.1: fix — revert PartialEq semantic change, drop unused derives

This commit is contained in:
2026-05-09 17:38:20 +02:00
parent b636b883a3
commit 04bde14a9e
+4 -4
View File
@@ -337,7 +337,7 @@ pub struct InstanceMethod {
/// `(Eq, a)` for `Eq a => ...`). Concrete-type constraints are legal
/// schema-wise but fired as `no-instance` at typecheck time if no
/// matching registry entry exists.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Constraint {
/// Class name.
pub class: String,
@@ -763,9 +763,9 @@ impl PartialEq for Type {
}
(Type::Var { name: a }, Type::Var { name: b }) => a == b,
(
Type::Forall { vars: a, constraints: ac, body: ab },
Type::Forall { vars: b, constraints: bc, body: bb },
) => a == b && ac == bc && ab == bb,
Type::Forall { vars: a, constraints: _, body: ab },
Type::Forall { vars: b, constraints: _, body: bb },
) => a == b && ab == bb,
_ => false,
}
}