-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Thread 'rustc' panicked at 'internal error: entered unreachable code' #81804
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Because we already emit some correct errors a potential fix would be to just remove the problematic However there's another problem;
|
Is there an expected buffer overrun here or is it guarded? |
Assigning |
I ran The regression happened in ff61949. cc @estebank |
I'm guessing is because of this code branch: ff61949#diff-6315a286b68ae6d04785441a5a8257cee4b533c65e8cd007a8c679bf57a8301cR1590 I haven't checked to see how it could even get to it, as looking at the code it should be unreachable. |
Actually, this is caused by a different problem (#86076), because if you try the same code without a trailing newline, this behavior doesn't occur (the error message then points to column 10, which is correct, as it is the location of the EOF token). The spurious |
Fixed by #87646 but there's no regression test for this case, marking as E-needs-test. |
…rrors Add regression test for rust-lang#81804 Closes rust-lang#81804 r? `@compiler-errors`
Rollup of 7 pull requests Successful merges: - rust-lang#96329 (Add a couple tests for rust-lang#90887 fixes) - rust-lang#97009 (Allow `unused_macro_rules` in path tests) - rust-lang#97075 (Add regression test for rust-lang#81804) - rust-lang#97079 (Change `Successors` to `impl Iterator<Item = BasicBlock>`) - rust-lang#97080 (remove the `RelateResultCompare` trait) - rust-lang#97093 (Migrate `maybe_recover_from_bad_type_plus` diagnostic) - rust-lang#97102 (Update function pointer call error message) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 7 pull requests Successful merges: - rust-lang#96329 (Add a couple tests for rust-lang#90887 fixes) - rust-lang#97009 (Allow `unused_macro_rules` in path tests) - rust-lang#97075 (Add regression test for rust-lang#81804) - rust-lang#97079 (Change `Successors` to `impl Iterator<Item = BasicBlock>`) - rust-lang#97080 (remove the `RelateResultCompare` trait) - rust-lang#97093 (Migrate `maybe_recover_from_bad_type_plus` diagnostic) - rust-lang#97102 (Update function pointer call error message) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Uh oh!
There was an error while loading. Please reload this page.
Code
Another case from #86086:
The md5 of poc.rs is: a70b98c9f88da9731e44e3888bc0b8de
Meta
It is test with nightly, beta, and stable versions.
rustc --version --verbose
:Error output
The output is from nightly.
Backtrace
The text was updated successfully, but these errors were encountered: