mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-23 07:51:08 +01:00
When asked to generate WGSL for `TypeInner::Struct`, rather than unconditionally calling `unreachable!`, defer to a new `TypeContext` method, `write_unnamed_struct`. Provide appropriate `write_unnamed_struct` implementations: - In the WGSL backend, implement this as `unreachable!`, since the WGSL backend should always know the proper name to use for a struct. - For diagnostic messages, generate something human-readable that indicates that some struct type was encountered. - For logging and debugging, defer to `TypeInner`'s `Debug` implementation.