-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Type expansion does not terminate when faced with erroneous recursive associated types #22672
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
Comments
This is still an issue after removing the outdated |
Yup, still an issue, I just spent a while debugging a cryptic "rustc overflowed its stack" bug, it would be useful if, when this can be detected, we could print a more specific error message on accidental circular type references. |
Old type checking bug. P-tag? |
Not any more:
given
I agree, and this is fixed. |
Thanks! |
rustc does not terminate (or will perhaps terminate with a stack overflow given sufficient time and insufficient memory) when provided the following code as input:
I expected an error message stating that the expansion recursion depth limit was exceeded (like when one makes such a mistake with C++ templates).
Instead, rustc does not terminate, and attaching gdb reveals an ever growing call stack (see backtrace below).
Meta
rustc --version --verbose
:Backtrace:
The text was updated successfully, but these errors were encountered: