-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Compiler hangs and consumes unbounded memory with complex trait bounds #126952
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
Might be a duplicate of #80066 |
Maybe you're right, but
|
as expected in a lot of these cases of hangs: @rustbot label +fixed-by-next-solver |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This is not a leak. It is very different to leak memory and have unbounded data structure growth or unbounded recursion, which is what's happening here. |
the eventual stabilization PR for next-solver is gonna fix like half of the open issues for rust-lang/rust at this rate. |
Just in case, I've tried
While if I do this: |
I tried this code:
I expected to see this happen: Code should throw an error and
rustc
should exit (or compile)Instead, this happened:
rustc
doesn't exit at all and leaks memory infinitely.Meta
I ran this code either on rust playground or via
rustc --crate-type rlib -v lib.rs
rustc --version --verbose
:Same behavior on stable:
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: