-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
thread 'rustc' panicked at 'index out of bounds: the len is 0 but the index is 0' #100981
Comments
@biuiko it would be super useful if you could provide test code for this! |
I'm sorry but I'm working on my company's project and this is a private project :( I'll see if I can make a minimal reproducible example |
FYI, I'm getting a similar error (i.e. the panic message looks like |
@dawnofmidnight is your codebase also private? I can take a look at this issue if it's public, even if all you have to share is the whole codebase. |
I have just made it public (beware, it's horrifying). I was working on https://github.com/dawnofmidnight/spyce/blob/main/crates/syntax/src/lexer/mod.rs when I got this, but I think I updated somewhere in between, so I'm not sure if it was that particular file. |
@dawnofmidnight if you don't have a commit that actually repro's the issue, then that's fine, but I probably won't be able to investigate it. @gimbles Yeah, possibly this issue is fixed by the same fix for #92004, since this is happening during codegen. I would be surprised if that fixes @dawnofmidnight's issue, which I think might be fixed by #99928 instead. Just for the record, any time that y'all see an ICE with |
The commit on that repo does error on the latest nightly, not sure why github says "4 hours ago".
Oh, woops. I just saw this and figured this might be the right place to mention it. |
Hi coworker of @biuiko here. We tried nightly and the good news is that the panic from rustc is gone, but now we're getting a
This should be a code design problem for us, I'll let you know whether this will compile in nightly after I fix this code. |
You could try increasing the recursion limit maybe? |
(unrelated to this thread, but @dawnofmidnight your issue is fixed by #99928.) |
Oh, yay! And sorry for interrupting the wrong thread. 😅 |
I fixed the infinite recursive type problem and now the code compiles both in nightly and stable. I tried but couldn't get a minimal reproducible example :( Hopefully this is fixed in #100757 |
BTW I tried nightly-2022-08-22 and that gives the exact same ICE output. Given that #100757 is merged 3 days ago, I believe that is the issue here. |
PRs usually take a release or two after being merged to land into a nightly. Honestly, considering the error message and the stacktrace 'n all are very similar, I'd bet that this is fixed and is a duplicate. |
Getting something similar and the latest nightly doesnt fix it. Here is the gist to the full error trace. |
Turns out not adding an await to a future triggered this on my path. The error message could be improved though i.e. it should not panic / crash |
I'm gonna close this due to
and
feel free to reopen an issue if you're able to reproduce this issue, and a code sample would be extra useful if so. |
Code
<code>
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: