From 908bab43b14f6811c40b053e674be899dd07e5c1 Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:54:08 +0200 Subject: [PATCH] [naga] add back `PartialEq` derives for some types (#6045) (cherry picked from commit 1f4f675b1bc252b2783594c72eade60f1a7358aa) --- CHANGELOG.md | 6 ++++++ naga/src/lib.rs | 10 ++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1c19d247b..1da6b95150 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,12 @@ Bottom level categories: ## Unreleased +### Added + +#### Naga + +- Added back implementations of PartialEq for more IR types. By @teoxoy in [#6045](https://github.com/gfx-rs/wgpu/pull/6045) + ### Bug Fixes #### General diff --git a/naga/src/lib.rs b/naga/src/lib.rs index 8ed7527922..ab470b4310 100644 --- a/naga/src/lib.rs +++ b/naga/src/lib.rs @@ -873,7 +873,7 @@ pub enum Literal { } /// Pipeline-overridable constant. -#[derive(Debug, Clone)] +#[derive(Clone, Debug, PartialEq)] #[cfg_attr(feature = "serialize", derive(Serialize))] #[cfg_attr(feature = "deserialize", derive(Deserialize))] #[cfg_attr(feature = "arbitrary", derive(Arbitrary))] @@ -891,8 +891,7 @@ pub struct Override { } /// Constant value. -#[derive(Debug, Clone)] -#[cfg_attr(test, derive(PartialEq))] +#[derive(Clone, Debug, PartialEq)] #[cfg_attr(feature = "serialize", derive(Serialize))] #[cfg_attr(feature = "deserialize", derive(Deserialize))] #[cfg_attr(feature = "arbitrary", derive(Arbitrary))] @@ -954,7 +953,7 @@ pub struct ResourceBinding { } /// Variable defined at module level. -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq)] #[cfg_attr(feature = "serialize", derive(Serialize))] #[cfg_attr(feature = "deserialize", derive(Deserialize))] #[cfg_attr(feature = "arbitrary", derive(Arbitrary))] @@ -1354,8 +1353,7 @@ bitflags::bitflags! { /// /// [`Constant`]: Expression::Constant /// [`Override`]: Expression::Override -#[derive(Clone, Debug)] -#[cfg_attr(test, derive(PartialEq))] +#[derive(Clone, Debug, PartialEq)] #[cfg_attr(feature = "serialize", derive(Serialize))] #[cfg_attr(feature = "deserialize", derive(Deserialize))] #[cfg_attr(feature = "arbitrary", derive(Arbitrary))]