Skip to content

Commit dd54aaf

Browse files
refactor(valid)!: remove unneeded ConstantError::Unresolved{Component,Size} (#2330)
Resolves #2329.
1 parent 59a2441 commit dd54aaf

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/valid/mod.rs

-16
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,6 @@ pub struct Validator {
174174
pub enum ConstantError {
175175
#[error("The type doesn't match the constant")]
176176
InvalidType,
177-
#[error("The component handle {0:?} can not be resolved")]
178-
UnresolvedComponent(Handle<crate::Constant>),
179-
#[error("The array size handle {0:?} can not be resolved")]
180-
UnresolvedSize(Handle<crate::Constant>),
181177
#[error(transparent)]
182178
Compose(#[from] ComposeError),
183179
}
@@ -311,18 +307,6 @@ impl Validator {
311307
}
312308
}
313309
crate::ConstantInner::Composite { ty, ref components } => {
314-
match types[ty].inner {
315-
crate::TypeInner::Array {
316-
size: crate::ArraySize::Constant(size_handle),
317-
..
318-
} if handle <= size_handle => {
319-
return Err(ConstantError::UnresolvedSize(size_handle));
320-
}
321-
_ => {}
322-
}
323-
if let Some(&comp) = components.iter().find(|&&comp| handle <= comp) {
324-
return Err(ConstantError::UnresolvedComponent(comp));
325-
}
326310
compose::validate_compose(
327311
ty,
328312
constants,

0 commit comments

Comments
 (0)