mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 04:04:06 +00:00
16 lines
283 B
Rust
16 lines
283 B
Rust
//@ run-pass
|
|
#![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();
|
|
}
|