Skip to content

Commit 6c79595

Browse files
committed
extra test for bug i found
1 parent 5ab1329 commit 6c79595

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// run-pass
2+
#![feature(generic_arg_infer)]
3+
4+
// test that we dont use defaults to aide in type inference
5+
6+
struct Foo<const N: usize = 2>;
7+
impl<const N: usize> Foo<N> {
8+
fn make_arr() -> [(); N] {
9+
[(); N]
10+
}
11+
}
12+
13+
fn main() {
14+
let [(), (), ()] = Foo::<_>::make_arr();
15+
}

0 commit comments

Comments
 (0)