summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/issue-80471.rs
blob: d0af8a5eaa89fc4b40216c6d5e43511463a2ed94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![feature(adt_const_params)]
//~^ WARN the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]

#[derive(PartialEq, Eq)]
enum Nat {
    Z,
    S(Box<Nat>),
}

fn foo<const N: Nat>() {}
//~^ ERROR `Box<Nat>` must be annotated with `#[derive(PartialEq, Eq)]` to be used as the type of a const parameter

fn main() {}