rust/tests/ui/const-generics/issue-80471.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
367 B
Rust
Raw Normal View History

2022-07-06 21:33:56 -05:00
#![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 `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() {}