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

12 lines
339 B
Rust
Raw Normal View History

2020-07-16 13:03:20 +02:00
#![feature(const_generics)] //~ WARN the feature `const_generics` is incomplete
fn foo<const N: usize, const A: [u8; N]>() {}
//~^ ERROR the type of const parameters must not
fn main() {
foo::<_, {[1]}>();
//~^ ERROR wrong number of const arguments
//~| ERROR wrong number of type arguments
//~| ERROR mismatched types
}