1 A non-structural-match type was used as the type of a const generic parameter.
3 Erroneous code example:
6 #![feature(adt_const_params)]
10 struct B<const X: A>; // error!
13 Only structural-match types (that is, types that derive `PartialEq` and `Eq`)
14 may be used as the types of const generic parameters.
16 To fix the previous code example, we derive `PartialEq` and `Eq`:
19 #![feature(adt_const_params)]
21 #[derive(PartialEq, Eq)] // We derive both traits here.
24 struct B<const X: A>; // ok!