Skip to content

ICE: task 'rustc' failed at 'internal error: entered unreachable code', /home/tj/rust-lang/src/librustc/middle/check_match.rs:714 #18027

Closed
@laumann

Description

@laumann
fn main() {
    match "ab".to_string().as_bytes() {
        b"\n" => (),
        [b1, b2] => (),
        _ => ()
    }
}

Results in the following:

> RUST_BACKTRACE=1 rustc foo.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://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'internal error: entered unreachable code', /home/tj/rust-lang/src/librustc/middle/check_match.rs:714

stack backtrace:
   1:     0x7f0d82c43240 - rt::backtrace::imp::write::h517d32de8f8710ddgDq
   2:     0x7f0d82c463d0 - failure::on_fail::h67b81ddf88f0460eDYq
   3:     0x7f0d87191190 - unwind::begin_unwind_inner::h76df22d18066ee19Gxd
   4:     0x7f0d877ddf10 - unwind::begin_unwind::h14104116603448327476
   5:     0x7f0d87a758a0 - middle::check_match::range_covered_by_constructor::h8fa219696c1aa6865Rn
   6:     0x7f0d87a73dc0 - middle::check_match::specialize::he49722c67c62a3f4KTn
   7:     0x7f0d87a72e50 - middle::check_match::is_useful_specialized::h8d2ed3b4f68da900IHn
   8:     0x7f0d87a73b40 - middle::check_match::is_useful::closure.117288
   9:     0x7f0d87a71ee0 - iter::Iterator::find::h3987249559819764121
  10:     0x7f0d87a50730 - middle::check_match::is_useful::hfd30574cebf54b25cyn
  11:     0x7f0d87a4b290 - middle::check_match::check_expr::hd4cdd89caef43d1fKWm
  12:     0x7f0d87a4d7c0 - middle::check_match::check_fn::h871a1aaa1a66c0cc88n
  13:     0x7f0d87a4e260 - visit::walk_item::h15341873477825387593
  14:     0x7f0d87a4db10 - middle::check_match::check_crate::h38e65867c6e4bcbboWm
  15:     0x7f0d877fc9e0 - util::common::time::h1991069288953859421
  16:     0x7f0d880cd880 - driver::driver::phase_3_run_analysis_passes::hf687192a195df4a9Aqx
  17:     0x7f0d880c7bc0 - driver::driver::compile_input::hcb2b12207a8e1dbdm7w
  18:     0x7f0d88153ee0 - driver::run_compiler::hf18eb26e92099043FVA
  19:     0x7f0d88153d90 - driver::run::closure.147365
  20:     0x7f0d878165a0 - task::TaskBuilder<S>::try_future::closure.101542
  21:     0x7f0d87816380 - task::TaskBuilder<S>::spawn_internal::closure.101513
  22:     0x7f0d874de0c0 - task::spawn_opts::closure.8447
  23:     0x7f0d871eca10 - rust_try_inner
  24:     0x7f0d871eca00 - rust_try
  25:     0x7f0d8718ea50 - unwind::try::hfee86de44e6a5329omd
  26:     0x7f0d8718e8d0 - task::Task::run::h4442d464d9df41ad2Bc
  27:     0x7f0d874dde00 - task::spawn_opts::closure.8387
  28:     0x7f0d871901a0 - thread::thread_start::h078eb5d6b9fd3766dWc
  29:     0x7f0d81fea0c0 - start_thread
  30:     0x7f0d86e57f89 - __clone
  31:                0x0 - <unknown>

Version:

> rustc --version=verbose
rustc 0.13.0-dev (a0ea210b3 2014-10-13 08:37:41 +0000)
binary: rustc
commit-hash: a0ea210b394aa1b61d341593a3f9098fe5bf7806
commit-date: 2014-10-13 08:37:41 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-dev

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