about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/pretty/gat-bounds.pp25
-rw-r--r--src/test/pretty/gat-bounds.rs17
2 files changed, 42 insertions, 0 deletions
diff --git a/src/test/pretty/gat-bounds.pp b/src/test/pretty/gat-bounds.pp
new file mode 100644
index 00000000000..0c95add4901
--- /dev/null
+++ b/src/test/pretty/gat-bounds.pp
@@ -0,0 +1,25 @@
+// Check that associated types print generic parameters and where clauses.
+// See issue #67509.
+
+// pretty-compare-only
+// pp-exact:gat-bounds.pp
+
+#![feature(generic_associated_types)]
+
+trait X {
+    type
+    Y<T>: Trait
+    where
+    Self: Sized;
+}
+
+impl X for () {
+    type
+    Y<T>
+    where
+    Self: Sized
+    =
+    u32;
+}
+
+fn main() { }
diff --git a/src/test/pretty/gat-bounds.rs b/src/test/pretty/gat-bounds.rs
new file mode 100644
index 00000000000..1275f432a3c
--- /dev/null
+++ b/src/test/pretty/gat-bounds.rs
@@ -0,0 +1,17 @@
+// Check that associated types print generic parameters and where clauses.
+// See issue #67509.
+
+// pretty-compare-only
+// pp-exact:gat-bounds.pp
+
+#![feature(generic_associated_types)]
+
+trait X {
+    type Y<T>: Trait where Self: Sized;
+}
+
+impl X for () {
+    type Y<T> where Self: Sized = u32;
+}
+
+fn main() { }