3 // Ensure that provided items are inherited properly even when impls vary in
4 // type parameters *and* rely on projections.
6 #![feature(specialization)]
8 use std::convert::Into;
11 fn to_u8(&self) -> u8;
15 fn to_item(&self) -> Self::Item;
18 impl<T, U> Trait for T where T: WithAssoc<Item=U>, U: Into<u8> {
19 fn to_u8(&self) -> u8 {
24 impl WithAssoc for u8 {
26 fn to_item(&self) -> u8 { *self }
32 assert!(3u8.to_u8() == 3u8);