mirror of https://github.com/rust-lang/rust
17 lines
304 B
Rust
17 lines
304 B
Rust
//@ 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!());
|
|
}
|