Skip to content

Internal Compiler Error: unexpected failure #11241

Closed
@bsummer4

Description

@bsummer4

I get the following error,

$ RUST_LOG=rustc=1 rustc bug.rs
task 'rustc' failed at 'called `Option::unwrap()` on a `None` value', ~/hack/rust/src/libstd/option.rs:133
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task '<main>' failed at 'explicit failure', ~/hack/rust/src/librustc/lib.rs:440

on the following code:

$ cat bug.rs
fn main () {
  let x : Option<~[~str]> = match ~[&"A"] {
    [] => { None }
    [&"A",..a] => { Some(~[]) }
    [&"B",..b] => { Some(~[]) }}; }

Running on:

$ rustc -v
rustc 0.9-pre (a1d3cc5 2013-12-30 18:56:54 -0800)
host: i686-unknown-linux-gnu

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