mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 06:50:59 +01:00
Improve the MemberOutOfBounds error
This commit is contained in:
1 parent
efd416d964
commit
e3827f8e08
1 file changed
+8
-2
+8
-2
@@ -57,9 +57,14 @@ pub enum TypeError {
|
||||
#[error("Structure member[{index}] at {offset} overlaps the previous member")]
|
||||
MemberOverlap { index: u32, offset: u32 },
|
||||
#[error(
|
||||
"Structure member[{index}] at {offset} and size {size} crosses the structure boundary"
|
||||
"Structure member[{index}] at {offset} and size {size} crosses the structure boundary of size {span}"
|
||||
)]
|
||||
MemberOutOfBounds { index: u32, offset: u32, size: u32 },
|
||||
MemberOutOfBounds {
|
||||
index: u32,
|
||||
offset: u32,
|
||||
size: u32,
|
||||
span: u32,
|
||||
},
|
||||
#[error("The composite type contains a top-level structure")]
|
||||
NestedTopLevel,
|
||||
}
|
||||
@@ -359,6 +364,7 @@ impl super::Validator {
|
||||
index: i as u32,
|
||||
offset: member.offset,
|
||||
size: base_size,
|
||||
span,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user