-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE when using slicing syntax with invalid code #20614
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
Labels
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Comments
I also ran into the same panic while updating old code. Here's some simpler code that also triggers the panic: fn main() {
let string = String::new();
string.foo()[0];
} (I think the panic only happens when the method is undefined, so if This gives me:
Rust version:
|
Closed
Getting the same problem - also because of an undefined method (spelt the method name wrong and got the ICE, fixed the spelling and no ICE) |
barosl
added a commit
to barosl/rust
that referenced
this issue
Jan 11, 2015
If the type of a node cannot be determined due to a previous type error, a "no type for node" ICE occurs. This commit makes it return ty_err instead in such a case. Fixes rust-lang#20401. Fixes rust-lang#20506. Fixes rust-lang#20614. Fixes rust-lang#20752. Fixes rust-lang#20829. Fixes rust-lang#20846. Fixes rust-lang#20885. Fixes rust-lang#20886.
bors
added a commit
that referenced
this issue
Jan 12, 2015
If the type of a node cannot be determined due to a previous type error, a `no type for node` ICE occurs. This commit makes it return `ty_err` instead in such a case. Fixes #20401. Fixes #20506. Fixes #20614. Fixes #20752. Fixes #20829. Fixes #20846. Fixes #20885. Fixes #20886. Fixes #20952. Fixes #20970.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While trying to grok/update some old code, I found that an ICE occurs in the following (invalid) code:
The error/output:
The text was updated successfully, but these errors were encountered: