about summary refs log tree commit diff
diff options
context:
space:
mode:
authormarmeladema <xademax@gmail.com>2021-04-20 22:40:09 +0100
committermarmeladema <xademax@gmail.com>2021-04-20 23:42:21 +0100
commitb6647b569262215f4f69a93b8e8121438c9db98b (patch)
tree14f544696f94f21c6df2e34037f4e41cc0ed04cd
parent6df26f897cffb2d86880544bb451c6b5f8509b2d (diff)
downloadrust-b6647b569262215f4f69a93b8e8121438c9db98b.tar.gz
rust-b6647b569262215f4f69a93b8e8121438c9db98b.zip
Add test for issue #79949
-rw-r--r--src/test/ui/associated-type-bounds/issue-79949.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/ui/associated-type-bounds/issue-79949.rs b/src/test/ui/associated-type-bounds/issue-79949.rs
new file mode 100644
index 00000000000..9f924f1fd81
--- /dev/null
+++ b/src/test/ui/associated-type-bounds/issue-79949.rs
@@ -0,0 +1,26 @@
+// check-pass
+
+#![allow(incomplete_features)]
+#![feature(associated_type_bounds)]
+#![feature(generic_associated_types)]
+
+trait MP {
+    type T<'a>;
+}
+struct S(String);
+impl MP for S {
+    type T<'a> = &'a str;
+}
+
+trait SR: MP {
+    fn sr<IM>(&self) -> i32
+    where
+        for<'a> IM: T<T: U<<Self as MP>::T<'a>>>;
+}
+
+trait T {
+    type T;
+}
+trait U<X> {}
+
+fn main() {}