Description
The following should type check but does not:
#![feature(const_generics)]
fn foo<const N: usize, const A: [u8; N]>() {}
fn bar() {
foo::<_, {[1]}>();
}
Errors with:
error[E0107]: wrong number of const arguments: expected 2, found 1
--> src/lib.rs:6:5
|
6 | foo::<_, {[1]}>();
| ^^^^^^^^^^^^^^^ expected 2 const arguments
error[E0107]: wrong number of type arguments: expected 0, found 1
--> src/lib.rs:6:11
|
6 | foo::<_, {[1]}>();
| ^ unexpected type argument
error[E0308]: mismatched types
--> src/lib.rs:6:15
|
6 | foo::<_, {[1]}>();
| ^^^ expected usize, found array of 1 elements
|
= note: expected type `usize`
found type `[{integer}; 1]`