about summary refs log tree commit diff
path: root/tests/ui/issues/issue-26056.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-26056.rs')
-rw-r--r--tests/ui/issues/issue-26056.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-26056.rs b/tests/ui/issues/issue-26056.rs
new file mode 100644
index 00000000000..99d43ec792b
--- /dev/null
+++ b/tests/ui/issues/issue-26056.rs
@@ -0,0 +1,22 @@
+trait MapLookup<Q> {
+    type MapValue;
+}
+
+impl<K> MapLookup<K> for K {
+    type MapValue = K;
+}
+
+trait Map: MapLookup<<Self as Map>::Key> {
+    type Key;
+}
+
+impl<K> Map for K {
+    type Key = K;
+}
+
+
+fn main() {
+    let _ = &()
+        as &dyn Map<Key=u32,MapValue=u32>;
+    //~^ ERROR E0038
+}