2022-07-06 21:33:56 -05:00
|
|
|
#![feature(adt_const_params)]
|
|
|
|
|
|
|
|
#[derive(PartialEq, Eq)]
|
|
|
|
enum Nat {
|
|
|
|
Z,
|
|
|
|
S(Box<Nat>),
|
|
|
|
}
|
|
|
|
|
|
|
|
fn foo<const N: Nat>() {}
|
2023-05-16 23:05:46 -05:00
|
|
|
//~^ ERROR `Nat` must implement `ConstParamTy` to be used as the type of a const generic parameter
|
2022-07-06 21:33:56 -05:00
|
|
|
|
|
|
|
fn main() {}
|