summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/generic_const_exprs/issue-105608.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/const-generics/generic_const_exprs/issue-105608.rs')
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-105608.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-105608.rs b/tests/ui/const-generics/generic_const_exprs/issue-105608.rs
new file mode 100644
index 000000000..e28ba3b1a
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/issue-105608.rs
@@ -0,0 +1,15 @@
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+
+struct Combination<const STRATEGIES: usize>;
+
+impl<const STRATEGIES: usize> Combination<STRATEGIES> {
+ fn and<M>(self) -> Combination<{ STRATEGIES + 1 }> {
+ Combination
+ }
+}
+
+pub fn main() {
+ Combination::<0>.and::<_>().and::<_>();
+ //~^ ERROR: type annotations needed
+}