mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
extra test for bug i found
This commit is contained in:
parent
5ab1329b58
commit
6c79595134
@ -0,0 +1,15 @@
|
||||
// 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();
|
||||
}
|
Loading…
Reference in New Issue
Block a user