mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 22:11:01 +01:00
Non-exhaustive matches on `Expression` make it harder to review changes that add new enum variants, because the compiler can't tell you that you've missed a case. Although I believe Clippy is able to do so, I don't think we should make a blanket rule of forbidding wildcard match arms against `Expression`. There are a few matches that are only concerned with a handful of variants, or a single variant. For example, variant, naga::front::spv::Parser::next_block is only concerned with whether an expression is a constant or not. In principle, these sites should also be checked when adding a new variant, but it seems too burdensome to require them to list all the `Expression` variants they don't care about. The principle should be applied only to matches that are already handling most variants. At the moment, there is only one such match on `Expression` in the code base, and it's only missing a few variants, so this is quick to fix.