diff options
Diffstat (limited to 'tests/ui/const-generics/unify_with_nested_expr.rs')
-rw-r--r-- | tests/ui/const-generics/unify_with_nested_expr.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/const-generics/unify_with_nested_expr.rs b/tests/ui/const-generics/unify_with_nested_expr.rs new file mode 100644 index 000000000..1271e0902 --- /dev/null +++ b/tests/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() {} |