-
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 681 but the index is 682' #102605
Comments
Can you check if this is fixed on nightly? |
@compiler-errors |
Ok, according the clue above I found a minimal code example async fn foo() -> Result<(), String> {
Ok(())
}
fn convert_result<T, E>(r: Result<T, E>) -> Option<T> {
None
}
fn main() -> Option<()> {
convert_result(foo())
} The above code should not compile; but instead of reporting errors it crashes the compiler. Seems only affects the stable channel; beta and nightly are working properly. (The example code can be rewritten as |
So this is fixed by #99928 -- unfortunately that's going to land in the next release cycle (1.65) and this isn't a critical enough ICE to warrant a patch release for 1.64 |
@compiler-errors can we add the repro to the test suite and close the ticket then? |
@rustbot claim |
Please do! |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#102241 (Package `rust-docs-json` into nightly components (take 3)) - rust-lang#102488 (Check generic argument compatibility when projecting assoc ty) - rust-lang#102647 (Only allow ~const bounds for traits with #[const_trait]) - rust-lang#102648 (Add test for rust-lang#102605) - rust-lang#102651 (It's not about types or consts, but the lack of regions) - rust-lang#102653 (resolve instance: missing value to `delay_span_bug`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Code
Still working out how to get rid of this and find a minimal replicating code example.
The backtrace however, contains some useful information like "index out of bounds", for those who knows the implementation of the compiler. I guess it should be a good clue to find out what makes it wrong.
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: