summaryrefslogtreecommitdiffstats
path: root/tests/incremental/const-generics/issue-62536.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/incremental/const-generics/issue-62536.rs')
-rw-r--r--tests/incremental/const-generics/issue-62536.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/incremental/const-generics/issue-62536.rs b/tests/incremental/const-generics/issue-62536.rs
new file mode 100644
index 000000000..93c1dbf44
--- /dev/null
+++ b/tests/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
+}