From e5c203ce2404ce5ea8612be895aab0ad6e388150 Mon Sep 17 00:00:00 2001 From: Marceline Cramer Date: Thu, 30 Apr 2026 20:08:50 -0600 Subject: [PATCH] Remove broken derive_where(Arbitrary) in IR --- crates/ir/src/lib.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/crates/ir/src/lib.rs b/crates/ir/src/lib.rs index 5a6a903..a55c283 100644 --- a/crates/ir/src/lib.rs +++ b/crates/ir/src/lib.rs @@ -18,6 +18,8 @@ //! A modular definition for desugared Kerolox IR. +// TODO: implement `Arbitrary` by hand since derive_where doesn't support it + #![warn(missing_docs)] use std::{ @@ -47,7 +49,6 @@ use serde::{Deserialize, Serialize}; #[derive_where(Clone, Debug, PartialEq, Eq)] #[derive_where(PartialOrd, Ord; T: OrdProgramInfo)] #[derive_where(Hash; T: HashProgramInfo)] -#[cfg_attr(feature = "fuzz", derive_where(Arbitrary; T: ArbitraryProgramInfo))] #[cfg_attr(feature = "serde", derive_where(Deserialize, Serialize; T: SerdeProgramInfo))] pub struct Program { pub relations: BTreeMap>, @@ -62,7 +63,6 @@ pub struct Program { #[derive_where(Clone, Debug, PartialEq, Eq)] #[derive_where(PartialOrd, Ord; T: OrdProgramInfo)] #[derive_where(Hash; T: HashProgramInfo)] -#[cfg_attr(feature = "fuzz", derive_where(Arbitrary; T: ArbitraryProgramInfo))] #[cfg_attr(feature = "serde", derive_where(Deserialize, Serialize; T: SerdeProgramInfo))] pub struct Relation { /// The relation's type. @@ -89,7 +89,6 @@ pub struct Relation { #[derive_where(Clone, Debug, PartialEq, Eq)] #[derive_where(PartialOrd, Ord; T: OrdProgramInfo)] #[derive_where(Hash; T: HashProgramInfo)] -#[cfg_attr(feature = "fuzz", derive_where(Arbitrary; T: ArbitraryProgramInfo))] #[cfg_attr(feature = "serde", derive_where(Deserialize, Serialize; T: SerdeProgramInfo))] pub struct Rule { /// The metadata for this rule. @@ -105,7 +104,6 @@ pub struct Rule { #[derive_where(Clone, Debug, PartialEq, Eq)] #[derive_where(PartialOrd, Ord; T: OrdProgramInfo)] #[derive_where(Hash; T: HashProgramInfo)] -#[cfg_attr(feature = "fuzz", derive_where(Arbitrary; T: ArbitraryProgramInfo))] #[cfg_attr(feature = "serde", derive_where(Deserialize, Serialize; T: SerdeProgramInfo))] pub struct Assumption { /// Metadata for this assumption. @@ -121,7 +119,6 @@ pub struct Assumption { #[derive_where(Clone, Debug, PartialEq, Eq)] #[derive_where(PartialOrd, Ord; T: OrdProgramInfo)] #[derive_where(Hash; T: HashProgramInfo)] -#[cfg_attr(feature = "fuzz", derive_where(Arbitrary; T: ArbitraryProgramInfo))] #[cfg_attr(feature = "serde", derive_where(Deserialize, Serialize; T: SerdeProgramInfo))] pub struct RuleBody { /// Metadata for this rule body. @@ -142,7 +139,6 @@ pub struct RuleBody { #[derive_where(Clone, Debug, PartialEq, Eq)] #[derive_where(PartialOrd, Ord; T: OrdProgramInfo)] #[derive_where(Hash; T: HashProgramInfo)] -#[cfg_attr(feature = "fuzz", derive_where(Arbitrary; T: ArbitraryProgramInfo))] #[cfg_attr(feature = "serde", derive_where(Deserialize, Serialize; T: SerdeProgramInfo))] pub struct Expr { pub meta: T::ExprMeta, @@ -152,7 +148,6 @@ pub struct Expr { #[derive_where(Clone, Debug, PartialEq, Eq)] #[derive_where(PartialOrd, Ord; T: OrdProgramInfo)] #[derive_where(Hash; T: HashProgramInfo)] -#[cfg_attr(feature = "fuzz", derive_where(Arbitrary; T: ArbitraryProgramInfo))] #[cfg_attr(feature = "serde", derive_where(Deserialize, Serialize; T: SerdeProgramInfo))] pub enum ExprKind { Extra(T::ExprExtra),