On Tue, Oct 29, 2024 at 6:58 PM Rob Herring <robh@xxxxxxxxxx> wrote: > > I really want a build error if the type is wrong, then the _ case > would be unreachable. No way to do that? When you need to work with a set of types, you would normally define a trait and implement it only for those traits, e.g. see rust/kernel/transmute.rs. Then it is a build error if you don't satisfy bounds etc. Cheers, Miguel