summaryrefslogtreecommitdiffstats
path: root/tests/ui/generic-associated-types/issue-92280.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/generic-associated-types/issue-92280.rs')
-rw-r--r--tests/ui/generic-associated-types/issue-92280.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/issue-92280.rs b/tests/ui/generic-associated-types/issue-92280.rs
new file mode 100644
index 000000000..9284beea3
--- /dev/null
+++ b/tests/ui/generic-associated-types/issue-92280.rs
@@ -0,0 +1,24 @@
+// check-pass
+
+#![allow(non_camel_case_types)]
+
+trait HasAssoc {
+ type Assoc;
+}
+
+trait Iterate<S: HasAssoc> {
+ type Iter<'a>
+ where
+ Self: 'a;
+}
+
+struct KeySegment_Broken<T> {
+ key: T,
+}
+impl<S: HasAssoc> Iterate<S> for KeySegment_Broken<S::Assoc> {
+ type Iter<'a> = ()
+ where
+ Self: 'a;
+}
+
+fn main() {}