Skip to content

ICE matching a tuple containing a string #14393

Description

@lucy

Code:

fn main() {
    match ("", ()) {
        (_, _) => (),
        ("", _) => (),
    }
}

Output:

~ > rustc test.rs
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'index out of bounds: the len is 0 but the index is 0', /build/rust-git/src/rust/src/librustc/middle/check_match.rs:262
stack backtrace:
   1:     0x7fb6b7174290 - rt::backtrace::imp::write::h2bd81792b12baabaPUy::v0.11.0.pre
   2:     0x7fb6b70f1020 - rt::unwind::begin_unwind_inner::hf025459ac89965dbXuy::v0.11.0.pre
   3:     0x7fb6b70e97e0 - rt::unwind::begin_unwind_fmt::hdf2abde05ea171af7ty::v0.11.0.pre
   4:     0x7fb6b7174030 - rust_begin_unwind
   5:     0x7fb6b71b6120 - failure::begin_unwind::hd8511e7163654fd6IOv::v0.11.0.pre
   6:     0x7fb6b71b6d70 - failure::fail_bounds_check::ha1974902474a29f7IMv::v0.11.0.pre
   7:     0x7fb6b7e3d900 - <unknown>
   8:     0x7fb6b7e3d900 - <unknown>
   9:     0x7fb6b7e43830 - <unknown>
  10:     0x7fb6b7e3d900 - <unknown>
  11:     0x7fb6b7e43830 - <unknown>
  12:     0x7fb6b7e3d900 - <unknown>
  13:     0x7fb6b7e37170 - <unknown>
  14:     0x7fb6b7e3ced0 - <unknown>
  15:     0x7fb6b7e39d90 - <unknown>
  16:     0x7fb6b7e3a960 - <unknown>
  17:     0x7fb6b7e3a010 - middle::check_match::check_crate::h4ecc262850114c4bYQw::v0.11.0.pre
  18:     0x7fb6b7e32380 - <unknown>
  19:     0x7fb6b82a2f60 - driver::driver::phase_3_run_analysis_passes::h9fe69b3bb03d321dITj::v0.11.0.pre
  20:     0x7fb6b829c160 - driver::driver::compile_input::hc60c22b08c843c82iJj::v0.11.0.pre
  21:     0x7fb6b8367980 - <unknown>
  22:     0x7fb6b83678a0 - <unknown>
  23:     0x7fb6b837cb70 - <unknown>
  24:     0x7fb6b8377e60 - <unknown>
  25:     0x7fb6ba209f10 - <unknown>
  26:     0x7fb6b716e410 - <unknown>
  27:     0x7fb6b71cbdf0 - rust_try
  28:     0x7fb6b716e360 - rt::task::Task::run::h5672b3545148c66eAjw::v0.11.0.pre
  29:     0x7fb6ba209cc0 - <unknown>
  30:     0x7fb6b7172690 - <unknown>
  31:     0x7fb6b6ab8060 - start_thread
  32:     0x7fb6b6db8489 - __clone
  33:                0x0 - <unknown>
~ > rustc -v
rustc 0.11.0-pre (87ad19e 2014-05-22 15:16:31 -0700)
host: x86_64-unknown-linux-gnu

Activity

  1. changed the title [-]ICE matching a string tuple[/-] [+]ICE matching a tuple containing a string[/+] on May 24, 2014
  2. added a commit that references this issue on Aug 22, 2014
    bb5dbbb
  3. added a commit that references this issue on Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions