summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generic-associated-types/equality-bound.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/generic-associated-types/equality-bound.rs')
-rw-r--r--src/test/ui/generic-associated-types/equality-bound.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/generic-associated-types/equality-bound.rs b/src/test/ui/generic-associated-types/equality-bound.rs
new file mode 100644
index 000000000..fcc2da801
--- /dev/null
+++ b/src/test/ui/generic-associated-types/equality-bound.rs
@@ -0,0 +1,15 @@
+fn sum<I: Iterator<Item = ()>>(i: I) -> i32 where I::Item = i32 {
+//~^ ERROR equality constraints are not yet supported in `where` clauses
+ panic!()
+}
+fn sum2<I: Iterator>(i: I) -> i32 where I::Item = i32 {
+//~^ ERROR equality constraints are not yet supported in `where` clauses
+ panic!()
+}
+fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {
+//~^ ERROR equality constraints are not yet supported in `where` clauses
+//~| ERROR failed to resolve: use of undeclared type `I`
+ panic!()
+}
+
+fn main() {}