Closed
Description
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