summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generic-associated-types/issue-88360.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/generic-associated-types/issue-88360.rs')
-rw-r--r--src/test/ui/generic-associated-types/issue-88360.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/generic-associated-types/issue-88360.rs b/src/test/ui/generic-associated-types/issue-88360.rs
new file mode 100644
index 000000000..8ee98201a
--- /dev/null
+++ b/src/test/ui/generic-associated-types/issue-88360.rs
@@ -0,0 +1,20 @@
+#![feature(generic_associated_types)]
+
+trait GatTrait {
+ type Gat<'a> where Self: 'a;
+
+ fn test(&self) -> Self::Gat<'_>;
+}
+
+trait SuperTrait<T>
+where
+ Self: 'static,
+ for<'a> Self: GatTrait<Gat<'a> = &'a T>,
+{
+ fn copy(&self) -> Self::Gat<'_> where T: Copy {
+ *self.test()
+ //~^ mismatched types
+ }
+}
+
+fn main() {}