mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-12-02 11:44:07 +00:00
Derive PartialEq for validation errors
This commit is contained in:
parent
929e07ff0c
commit
4ed91330cf
@ -41,7 +41,7 @@ pub struct Typifier {
|
||||
resolutions: Vec<Resolution>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Error)]
|
||||
#[derive(Clone, Debug, Error, PartialEq)]
|
||||
pub enum ResolveError {
|
||||
#[error("Invalid index into array")]
|
||||
InvalidAccessIndex,
|
||||
|
@ -13,7 +13,7 @@ pub struct Validator {
|
||||
typifier: Typifier,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, thiserror::Error)]
|
||||
#[derive(Clone, Debug, PartialEq, thiserror::Error)]
|
||||
pub enum GlobalVariableError {
|
||||
#[error("Usage isn't compatible with the storage class")]
|
||||
InvalidUsage,
|
||||
@ -32,7 +32,7 @@ pub enum GlobalVariableError {
|
||||
OutOfRangeBinding,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, thiserror::Error)]
|
||||
#[derive(Clone, Debug, PartialEq, thiserror::Error)]
|
||||
pub enum LocalVariableError {
|
||||
#[error("Initializer is not a constant expression")]
|
||||
InitializerConst,
|
||||
@ -40,7 +40,7 @@ pub enum LocalVariableError {
|
||||
InitializerType,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, thiserror::Error)]
|
||||
#[derive(Clone, Debug, PartialEq, thiserror::Error)]
|
||||
pub enum FunctionError {
|
||||
#[error(transparent)]
|
||||
Resolve(#[from] ResolveError),
|
||||
@ -54,7 +54,7 @@ pub enum FunctionError {
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, thiserror::Error)]
|
||||
#[derive(Clone, Debug, PartialEq, thiserror::Error)]
|
||||
pub enum EntryPointError {
|
||||
#[error("Early depth test is not applicable")]
|
||||
UnexpectedEarlyDepthTest,
|
||||
@ -74,7 +74,7 @@ pub enum EntryPointError {
|
||||
Function(#[from] FunctionError),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, thiserror::Error)]
|
||||
#[derive(Clone, Debug, PartialEq, thiserror::Error)]
|
||||
pub enum ValidationError {
|
||||
#[error("The type {0:?} width {1} is not supported")]
|
||||
InvalidTypeWidth(crate::ScalarKind, crate::Bytes),
|
||||
|
Loading…
Reference in New Issue
Block a user