Skip to content
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

Internal compiler error: index out of bounds #12751

Closed
milibopp opened this issue Mar 7, 2014 · 4 comments
Closed

Internal compiler error: index out of bounds #12751

milibopp opened this issue Mar 7, 2014 · 4 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@milibopp
Copy link
Contributor

milibopp commented Mar 7, 2014

I tried to update a library to the most recent Rust, but ran into this issue. Basically I get this error:

error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: the compiler hit an unexpected failure path. this is a bug
Ok(task 'rustc' failed at 'index out of bounds: the len is 0 but the index is 0', /build/rust-git/src/rust/src/librustc/lib.rs:1
)

I have no idea though, what in the codebase causes this. Version info:

rustc 0.10-pre (0e95b08 2014-03-06 15:11:42 -0800)
host: x86_64-unknown-linux-gnu
@huonw huonw added the I-ICE label Mar 7, 2014
@jeremyletang
Copy link
Contributor

I get the same error yesterday and and the problem was the unused unnamed parameters in a trait with default methods.
I haven't open an issue because of #8417, but i've just see that this issue is closed.
Maybe your issue is the same?

@sebcrozet
Copy link
Contributor

I have just given a name to each unnamed parameter, and it compiles fine now.
So it seems this bug is very similar to #8417 alright, but the original example given by @pnkfelix does compile without ICE!

@pnkfelix
Copy link
Member

I do not see a concrete test case. Can you please provide one, preferably a minimal one?

@alexcrichton
Copy link
Member

Closing as a likely dupe of #13775. If it's different though, feel free to reopen!

flip1995 pushed a commit to flip1995/rust that referenced this issue Aug 8, 2024
Fixes rust-lang#12751

changelog: Fix [`redundant_slicing`] when the slice is behind a mutable reference
flip1995 pushed a commit to flip1995/rust that referenced this issue Aug 8, 2024
Fix [`redundant_slicing`] when the slice is behind a mutable reference

Fixes rust-lang#12751

changelog: Fix [`redundant_slicing`] when the slice is behind a mutable reference and a immutable reference is expected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

6 participants