Add a regression test for issue-75299

This commit is contained in:
Yuki Okushi 2020-10-01 14:10:53 +09:00
parent d4fdf6e754
commit 38f460f866
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
// compile-flags: -Zmir-opt-level=3
// run-pass
#![feature(const_generics)]
#![allow(incomplete_features)]
fn main() {
fn foo<const N: usize>() -> [u8; N] {
[0; N]
}
let _x = foo::<1>();
}