// run-pass #![feature(associated_type_defaults)] trait Foo { type Out: Default + ToString = T; } impl Foo for () { } impl Foo for () { type Out = bool; } fn main() { assert_eq!( <() as Foo>::Out::default().to_string(), "0"); assert_eq!( <() as Foo>::Out::default().to_string(), "false"); }