2020-11-26 09:32:41 -06:00
|
|
|
struct Take(Take);
|
|
|
|
//~^ ERROR has infinite size
|
|
|
|
|
|
|
|
// check that we don't hang trying to find the tail of a recursive struct (#79437)
|
|
|
|
fn foo() -> Take {
|
|
|
|
Take(loop {})
|
|
|
|
}
|
|
|
|
|
2022-08-15 14:11:11 -05:00
|
|
|
// mutually infinite structs
|
|
|
|
struct Foo { //~ ERROR has infinite size
|
|
|
|
x: Bar<Foo>,
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Bar<T>([T; 1]);
|
|
|
|
|
2020-11-26 09:32:41 -06:00
|
|
|
fn main() {}
|