Skip to content

Commit

Permalink
extra test for bug i found
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxyUwU committed Dec 13, 2021
1 parent 5ab1329 commit 6c79595
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/test/ui/const-generics/generic_arg_infer/dont-use-defaults.rs
@@ -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();
}

0 comments on commit 6c79595

Please sign in to comment.