Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generator: Apply
must_use
attributes to all Vulkan structs (#845)
All structs are marked as `Copy`, and builders move `self` for a convenient builder pattern directly on `default()` (using `&mut` requires requires first keeping the instance alive in a `let` binding). This however leads to builder functions accidentally moving a copy of `self`, mutating it, and dropping the result directly when the caller did not consume the returned value in ad-hoc field updates, in turn leaving the author confused why their code compiles without warnings while the struct was not updated. Annotating all Vulkan structs with `#[must_use]` should at least give them an idea why.
- Loading branch information