summaryrefslogtreecommitdiffstats
path: root/tests/ui/generic-associated-types/issue-88360.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/generic-associated-types/issue-88360.rs')
-rw-r--r--tests/ui/generic-associated-types/issue-88360.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/issue-88360.rs b/tests/ui/generic-associated-types/issue-88360.rs
new file mode 100644
index 000000000..c02690618
--- /dev/null
+++ b/tests/ui/generic-associated-types/issue-88360.rs
@@ -0,0 +1,18 @@
+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() {}