2024-02-16 20:02:50 +00:00
|
|
|
//@ run-pass
|
2021-12-13 03:33:14 +00:00
|
|
|
#![feature(generic_arg_infer)]
|
|
|
|
|
|
|
|
|
|
// test that we dont use defaults to aide in type inference
|
|
|
|
|
|
|
|
|
|
struct Foo<const N: usize = 2>;
|
|
|
|
|
impl<const N: usize> Foo<N> {
|
|
|
|
|
fn make_arr() -> [(); N] {
|
|
|
|
|
[(); N]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let [(), (), ()] = Foo::<_>::make_arr();
|
|
|
|
|
}
|