3 #![feature(associated_type_defaults)]
5 // Having a cycle in assoc. type defaults is okay, as long as there's no impl
14 // An impl has to break the cycle to be accepted.
19 // Check that the type propagates as expected (seen from inside the impl)
29 // Check that the type propagates as expected (seen from inside the impl)
40 // Check that the type propagates as expected (seen from inside the impl)
41 let _: Self::A = Vec::<()>::new();
47 // Check that both impls now have the right types (seen from outside the impls)
48 let _: <u8 as Tr>::A = 0u8;
49 let _: <u8 as Tr>::B = 0u8;
51 let _: <String as Tr>::A = ();
52 let _: <String as Tr>::B = ();
54 let _: <() as Tr>::A = Vec::<()>::new();
55 let _: <() as Tr>::B = 0u8;