]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/issue-80471.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / ui / const-generics / issue-80471.rs
1 #![feature(adt_const_params)]
2 //~^ WARN the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
3
4 #[derive(PartialEq, Eq)]
5 enum Nat {
6     Z,
7     S(Box<Nat>),
8 }
9
10 fn foo<const N: Nat>() {}
11 //~^ ERROR `Box<Nat>` must be annotated with `#[derive(PartialEq, Eq)]` to be used as the type of a const parameter
12
13 fn main() {}