-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
infinite recursion Trait that provides impl of its own super trait #9095
Labels
A-type-system
Area: Type system
Comments
@huonw clued me in that we don't have stack-overflow checks yet in the new runtime. This is still a bug in rustc, of course. :) |
Twisted, cool idea. GHC accepts it, given the appropriate pragmas:
Compiles and prints |
edited the title to |
So, uh, this compiles now?
|
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Jul 18, 2022
…arth Fix `needless_borrow` 9095 fixes rust-lang#9095 changelog: Don't lint `needless_borrow` on method receivers when it would change which trait impl is called
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test case:
Now here's the scary thing: the transcript of compiling it:
From my attempts to acquire a stack trace in gdb, I am currently assuming that we're hitting an infinite loop, but we are not catching the stack overflow properly. At least, that seems to be happening some of the time; sometimes the stack seems to have been corrupted (at least from the viewpoint of gdb) so I am not certain.
Here are some stack traces (some partial) of interest:
Presumably corrupted:
Presumably stack overflowed:
The text was updated successfully, but these errors were encountered: