For a type to be valid, in theory, as the type of a const parameter, we must be able to compare values of that type at compile-time. Furthermore, equality of values should be well-behaved (namely, it should be deterministic, reflexive, symmetric, and transitive). To guarantee these properties, the concept of *structural equality* was introduced in the [const generics RFC](https://github.com/rust-lang/rfcs/blob/master/text/2000-const-generics.md): essentially this includes any type with `#[derive(PartialEq, Eq)]` whose members also satisfy structural equality.
0 commit comments