-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
struct Foo(Self) leads to infinite loop #79437
Comments
The following also hangs, though a diagnostic is first emitted:
|
The hang seems to happen in |
I have modified
|
More minimal example:
This one demonstrates that it's a regression, it errors out immediately on 1.35 but hangs on 1.36. |
searched toolchains nightly-2019-04-09 through nightly-2019-05-22 Regression in nightly-2019-04-24 found 9 bors merge commits in the specified range Probably #60126? I guess the compiler used to abort early after the recursive type error but now doesn't and hangs because later code assumes structs aren't recursive. @rustbot label regression-from-stable-to-stable |
cc #75100 (comment) - maybe something similar is necessary here? |
What #60126 did was stop doing that (aborting early if there's an error) for |
Perhaps the recursive field could be replaced by a |
Assigning |
This issue have been also reported in #74201. |
I tried this code:
Running
rustc main.rs
does not terminate after a long time. After running for 4 minutes, therustc
process is using 99.2% CPU and about 80 MB memory.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: