Open
Description
Currently, users may specify _
in place of a type: the compiler will then suggest the intended type. This ought to work for consts too, but currently does not (see #79557).
fn foo<const N: usize, const K: usize>(data: [u32; N]) -> [u32; K] {
[0; K]
}
fn main() {
let a = foo::<_, 2>([0, 1, 2]);
}
The difficulty is that the intended use of _
(as either a type or const) is ambiguous until type checking, so runs into the same problems as #66615 and #77773.