mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
13 lines
233 B
Rust
13 lines
233 B
Rust
#![feature(adt_const_params)]
|
|
|
|
#[derive(PartialEq, Eq)]
|
|
enum Nat {
|
|
Z,
|
|
S(Box<Nat>),
|
|
}
|
|
|
|
fn foo<const N: Nat>() {}
|
|
//~^ ERROR `Nat` must implement `ConstParamTy` to be used as the type of a const generic parameter
|
|
|
|
fn main() {}
|