Skip to content

Internal compiler error: 'index out of bounds' #10905

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

Closed
wackywendell opened this issue Dec 10, 2013 · 3 comments
Closed

Internal compiler error: 'index out of bounds' #10905

wackywendell opened this issue Dec 10, 2013 · 3 comments

Comments

@wackywendell
Copy link
Contributor

When trying to compile this code, I get the following error:

$ rustc --lib "mdsim2.rs"
task 'rustc' failed at 'index out of bounds: the len is 26499407 but the index is 26499407', /build/rust-git/src/rust/src/libextra/ebml.rs:100
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task '<main>' failed at 'explicit failure', /build/rust-git/src/rust/src/librustc/lib.rs:393
$ rustc -v
rustc 0.9-pre (f817ed3 2013-12-09 13:51:32 -0800)
host: x86_64-unknown-linux-gnu

Note that this requires nalgebra, which I had compiled just previously in my ~/.rust directory (different from the attached Gist file).

Also, I did try running with RUST_LOG=rustc=1, but I could see no difference; I'll file a separate bug report for that.

One more note: when I stripped this file down, the compiler error changed; it used to say task 'rustc' failed at 'lookup_item: id not found: 74888', /build/rust-git/src/rust/src/librustc/metadata/decoder.rs:91/

@alexcrichton
Copy link
Member

This is likely because some dependencies were not rebuilt or have fallen out of date. If you recompile relevant dependencies, does this error go away?

@wackywendell
Copy link
Contributor Author

Oh, you're right (sort of): rebuilding the library didn't do it, but I wasn't correctly adding the directory it was in.

Why isn't there an error saying something like "dependency not found"?

@alexcrichton
Copy link
Member

An old version must have been found in some other system directory (possibly very far out of date). It looks like this bug is a dupe of #10207 in this case.

Thanks again for the bug report by the way!

flip1995 pushed a commit to flip1995/rust that referenced this issue Jun 30, 2023
[`redundant_closure`]: special case inclusive ranges

Fixes rust-lang#10684.

`x..=y` ranges need a bit of special handling in this lint because it desugars to a call to the lang item `RangeInclusiveNew`, where the callee span would be the same as the range expression itself, so the suggestion looked a bit weird. It now correctly suggests `RangeInclusive::new`.

changelog: [`redundant_closure`]: special case `RangeInclusive`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants