rust/tests/ui/const-generics/min_const_generics/inferred_const.rs
2024-02-16 20:02:50 +00:00

10 lines
179 B
Rust

#![feature(generic_arg_infer)]
//@ run-pass
fn foo<const N: usize, const K: usize>(_data: [u32; N]) -> [u32; K] {
[0; K]
}
fn main() {
let _a = foo::<_, 2>([0, 1, 2]);
}