1 2 3 4 5 6 7 8 9 10 11
#![allow(warnings)] trait Trait<T> { fn foo(_: T) {} } pub struct Foo<T = Box<Trait<DefaultFoo>>>; //~ ERROR cycle detected type DefaultFoo = Foo; fn main() { }