rust/tests/ui/const-generics/min_const_generics/inferred_const.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
178 B
Rust
Raw Normal View History

2021-05-06 10:33:44 -05:00
#![feature(generic_arg_infer)]
2021-04-24 16:41:57 -05:00
// run-pass
fn foo<const N: usize, const K: usize>(_data: [u32; N]) -> [u32; K] {
[0; K]
}
fn main() {
2021-04-24 16:41:57 -05:00
let _a = foo::<_, 2>([0, 1, 2]);
}