1 #![feature(associated_type_defaults)]
3 // This used to cause an ICE because assoc. type defaults weren't properly
6 trait Foo<T: Default + ToString> {
7 type Out: Default + ToString + ?Sized = dyn ToString; //~ ERROR not satisfied
10 impl Foo<u32> for () {}
11 impl Foo<u64> for () {}
14 assert_eq!(<() as Foo<u32>>::Out::default().to_string(), "false");
15 //~^ ERROR no function or associated item named `default` found for trait object