Files
rust/src/test/ui/const-generics/issues/issue-62878.rs

13 lines
387 B
Rust
Raw Normal View History

// revisions: full min
#![cfg_attr(full, feature(adt_const_params, generic_arg_infer))]
#![cfg_attr(full, allow(incomplete_features))]
2020-07-16 13:03:20 +02:00
fn foo<const N: usize, const A: [u8; N]>() {}
//~^ ERROR the type of const parameters must not
//[min]~| ERROR `[u8; _]` is forbidden as the type of a const generic parameter
2020-07-16 13:03:20 +02:00
fn main() {
foo::<_, {[1]}>();
2021-04-24 21:41:57 +00:00
//[full]~^ ERROR mismatched types
2020-07-16 13:03:20 +02:00
}