diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/incremental/const-generics/issue-62536.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/incremental/const-generics/issue-62536.rs b/src/test/incremental/const-generics/issue-62536.rs new file mode 100644 index 000000000..93c1dbf44 --- /dev/null +++ b/src/test/incremental/const-generics/issue-62536.rs @@ -0,0 +1,9 @@ +// revisions:cfail1 +struct S<T, const N: usize>([T; N]); + +fn f<T, const N: usize>(x: T) -> S<T, {N}> { panic!() } + +fn main() { + f(0u8); + //[cfail1]~^ ERROR type annotations needed +} |