rust/tests/ui/issues/issue-26056.rs

23 lines
294 B
Rust

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
}