summaryrefslogtreecommitdiffstats
path: root/tests/ui/generic-associated-types/issue-47206-where-clause.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/generic-associated-types/issue-47206-where-clause.rs')
-rw-r--r--tests/ui/generic-associated-types/issue-47206-where-clause.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/issue-47206-where-clause.rs b/tests/ui/generic-associated-types/issue-47206-where-clause.rs
new file mode 100644
index 000000000..3d1b88ddf
--- /dev/null
+++ b/tests/ui/generic-associated-types/issue-47206-where-clause.rs
@@ -0,0 +1,14 @@
+// Check that this program doesn't cause the compiler to error without output.
+
+trait Foo {
+ type Assoc3<T>;
+}
+
+struct Bar;
+
+impl Foo for Bar {
+ type Assoc3<T> = Vec<T> where T: Iterator;
+ //~^ ERROR impl has stricter requirements than trait
+}
+
+fn main() {}