diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-26056.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-26056.rs b/src/test/ui/issues/issue-26056.rs new file mode 100644 index 000000000..99d43ec79 --- /dev/null +++ b/src/test/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 +} |