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

ICE: ident only path should have been covered already #23597

Closed
fmendez opened this issue Mar 21, 2015 · 2 comments · Fixed by #23930
Closed

ICE: ident only path should have been covered already #23597

fmendez opened this issue Mar 21, 2015 · 2 comments · Fixed by #23930
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@fmendez
Copy link

fmendez commented Mar 21, 2015

Minimal example to reproduce (malformed array declaration):

fn main() {
    let bla[isize;5] = [0;5];
}

Output

src/main.rs:2:9: 2:12 error: internal compiler error: ident only path should have been covered already
src/main.rs:2     let bla[isize;5] = [0;5];
                      ^~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libsyntax/diagnostic.rs:130

stack backtrace:
   1:        0x11119625b - sys::backtrace::write::hf72be5f813c90d15u5C
   2:        0x1111c1918 - panicking::on_panic::h357b9ffd8bc8f79dSWI
   3:        0x1110de7f7 - rt::unwind::begin_unwind_inner::h12b438ebbd8042edUFI
   4:        0x1108d37ce - rt::unwind::begin_unwind::h4369435781297418514
   5:        0x1108d377b - diagnostic::SpanHandler::span_bug::h853a022b690aedcaDaB
   6:        0x1108fbe58 - parse::parser::Parser<'a>::parse_pat::hc63de28bd64b0b52oBH
   7:        0x11090ff01 - parse::parser::Parser<'a>::parse_local::h9c98c8f6a10fa0c3ISH
   8:        0x110910930 - parse::parser::Parser<'a>::parse_stmt_::h89dfb0c159e79c82PVH
   9:        0x1109090eb - parse::parser::Parser<'a>::parse_block_tail::h29764a009812f1c395H
  10:        0x1108f5b9f - parse::parser::Parser<'a>::parse_inner_attrs_and_block::hbcd241202ba69a8024H
  11:        0x11091c93f - parse::parser::Parser<'a>::parse_item_fn::h07befed94e01b7afSHI
  12:        0x1109137e9 - parse::parser::Parser<'a>::parse_item_::h1a7567183f075285hCJ
  13:        0x110922781 - parse::parser::Parser<'a>::parse_mod_items::h34bd4c448262f56bR5I
  14:        0x1109287fa - parse::parser::Parser<'a>::parse_crate_mod::h66c5e5883ab0fe0d50J
  15:        0x11093d630 - parse::parse_crate_from_file::hce10797f00bc1302SPQ
  16:        0x10d6f85ee - driver::phase_1_parse_input::closure.15455
  17:        0x10d6d204c - driver::phase_1_parse_input::h8843c0cb78a2306dOqa
  18:        0x10d6cf0ef - driver::compile_input::h7fdf739785f6d9d4Rba
  19:        0x10d7907d3 - run_compiler::hb484336e43423a0fv2b
  20:        0x10d78e2f5 - thunk::F.Invoke<A, R>::invoke::h11654417678186204529
  21:        0x10d78d6b7 - rt::unwind::try::try_fn::h10741634765121132143
  22:        0x111245f68 - rust_try_inner
  23:        0x111245f55 - rust_try
  24:        0x10d78da55 - thunk::F.Invoke<A, R>::invoke::h13457747256212984027
  25:        0x1111ac83d - sys::thread::create::thread_start::h937519545136f3ecJBH
  26:     0x7fff94a06267 - _pthread_body
  27:     0x7fff94a061e4 - _pthread_start

Could not compile `test-rs`.

To learn more, run the command again with --verbose.

Rust version:

rustc --version                                                                              
rustc 1.0.0-nightly (f4e0ce66a 2015-03-19) (built 2015-03-20)
@rprichard
Copy link
Contributor

Looks very similar to #22972, which crashes on let v[0]=v[1];. Even fn main() { let v[]; } is enough to cause the ident only path should have been covered already crash.

@jdm jdm added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Mar 22, 2015
@Kimundi
Copy link
Member

Kimundi commented Mar 22, 2015

See #22426

bors added a commit that referenced this issue Apr 3, 2015
Fixes #22757
Fixes #22972
Fixes #23044
Fixes #23151
Fixes #23597
Fixes #23656
Fixes #23929
It also fixes some other corner cases in range patterns, like incorrect spans or not accepting global paths after `...`.

It passes `make check` but needs some additional tests (then it will fix #22546 as well), I'll write them today or tomorrow.
Manishearth added a commit to Manishearth/rust that referenced this issue Apr 3, 2015
Fixes rust-lang#22757
Fixes rust-lang#22972
Fixes rust-lang#23044
Fixes rust-lang#23151
Fixes rust-lang#23597
Fixes rust-lang#23656
Fixes rust-lang#23929
It also fixes some other corner cases in range patterns, like incorrect spans or not accepting global paths after `...`.

It passes `make check` but needs some additional tests (then it will fix rust-lang#22546 as well), I'll write them today or tomorrow.
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

Successfully merging a pull request may close this issue.

4 participants