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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
294 B
Rust
Raw Normal View History

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 _ = &()
2019-05-28 18:46:13 +00:00
as &dyn Map<Key=u32,MapValue=u32>;
2016-08-08 22:54:16 +00:00
//~^ ERROR E0038
}