]> git.proxmox.com Git - rustc.git/blob - tests/ui/const-generics/issue-80471.rs
New upstream version 1.72.1+dfsg1
[rustc.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 `Nat` must implement `ConstParamTy` to be used as the type of a const generic parameter
12
13 fn main() {}