summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/generic_const_exprs/issue-69654.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/generic_const_exprs/issue-69654.rs')
-rw-r--r--src/test/ui/const-generics/generic_const_exprs/issue-69654.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/generic_const_exprs/issue-69654.rs b/src/test/ui/const-generics/generic_const_exprs/issue-69654.rs
new file mode 100644
index 000000000..9b36699bb
--- /dev/null
+++ b/src/test/ui/const-generics/generic_const_exprs/issue-69654.rs
@@ -0,0 +1,19 @@
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+
+trait Bar<T> {}
+impl<T> Bar<T> for [u8; T] {}
+//~^ ERROR expected value, found type parameter `T`
+
+struct Foo<const N: usize> {}
+impl<const N: usize> Foo<N>
+where
+ [u8; N]: Bar<[(); N]>,
+{
+ fn foo() {}
+}
+
+fn main() {
+ Foo::foo();
+ //~^ ERROR the function or associated item
+}