blob: 7bd87ae06c5e4bbb8be72d27f0601bc98326d02b [file] [log] [blame]
//@ build-fail
//~^ ERROR cycle detected when computing layout of `Foo<()>`
// Regression test for a stack overflow: https://github.com/rust-lang/rust/issues/113197
trait A { type Assoc; }
impl A for () {
type Assoc = Foo<()>;
}
struct Foo<T: A>(T::Assoc);
fn main() {
Foo::<()>(todo!());
}