about summary refs log tree commit diff
path: root/tests/incremental/const-generics/hash-tyvid-regression-1.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/incremental/const-generics/hash-tyvid-regression-1.rs')
-rw-r--r--tests/incremental/const-generics/hash-tyvid-regression-1.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/incremental/const-generics/hash-tyvid-regression-1.rs b/tests/incremental/const-generics/hash-tyvid-regression-1.rs
new file mode 100644
index 00000000000..5ff7b19d894
--- /dev/null
+++ b/tests/incremental/const-generics/hash-tyvid-regression-1.rs
@@ -0,0 +1,16 @@
+// revisions: cfail
+#![feature(generic_const_exprs, adt_const_params)]
+#![allow(incomplete_features)]
+// regression test for #77650
+fn c<T, const N: std::num::NonZeroUsize>()
+where
+    [T; N.get()]: Sized,
+{
+    use std::convert::TryFrom;
+    <[T; N.get()]>::try_from(())
+    //~^ error: the trait bound
+    //~| error: the trait bound
+    //~| error: mismatched types
+}
+
+fn main() {}