about summary refs log tree commit diff
path: root/src/test/ui/const-generics/unify_with_nested_expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/unify_with_nested_expr.rs')
-rw-r--r--src/test/ui/const-generics/unify_with_nested_expr.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/unify_with_nested_expr.rs b/src/test/ui/const-generics/unify_with_nested_expr.rs
new file mode 100644
index 00000000000..1271e0902a3
--- /dev/null
+++ b/src/test/ui/const-generics/unify_with_nested_expr.rs
@@ -0,0 +1,18 @@
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+
+fn foo<const N: usize>()
+where
+    [(); N + 1 + 1]:,
+{
+    bar();
+    //~^ ERROR: type annotations
+}
+
+fn bar<const N: usize>()
+where
+    [(); N + 1]:,
+{
+}
+
+fn main() {}