Remove broken derive_where(Arbitrary) in IR
This commit is contained in:
@@ -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<T: ProgramInfo> {
|
||||
pub relations: BTreeMap<T::RelationLabel, Relation<T>>,
|
||||
@@ -62,7 +63,6 @@ pub struct Program<T: ProgramInfo> {
|
||||
#[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<T: ProgramInfo> {
|
||||
/// The relation's type.
|
||||
@@ -89,7 +89,6 @@ pub struct Relation<T: ProgramInfo> {
|
||||
#[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<T: ProgramInfo> {
|
||||
/// The metadata for this rule.
|
||||
@@ -105,7 +104,6 @@ pub struct Rule<T: ProgramInfo> {
|
||||
#[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<T: ProgramInfo> {
|
||||
/// Metadata for this assumption.
|
||||
@@ -121,7 +119,6 @@ pub struct Assumption<T: ProgramInfo> {
|
||||
#[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<T: ProgramInfo> {
|
||||
/// Metadata for this rule body.
|
||||
@@ -142,7 +139,6 @@ pub struct RuleBody<T: ProgramInfo> {
|
||||
#[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<T: ProgramInfo> {
|
||||
pub meta: T::ExprMeta,
|
||||
@@ -152,7 +148,6 @@ pub struct Expr<T: ProgramInfo> {
|
||||
#[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<T: ProgramInfo> {
|
||||
Extra(T::ExprExtra),
|
||||
|
||||
Reference in New Issue
Block a user