ICE with nested vector patterns with an unconstrained type

7438707
Opened by Huon Wilson at 2014-05-11 00:45:20

Removing the actual pattern match gives cannot determine a type for this expression: unconstrained type.

fn main() {
    match ~[~[]] {
        [[]] => {}
        _ => {}
    }
}
rust: task failed at 'ty_vstore() called on invalid sty: &ty_err', /home/huon/rust/src/librustc/middle/ty.rs:2799
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7f54c2dd9beb]
/usr/local/bin/../lib/librustrt.so(+0x2b301)[0x7f54c2deb301]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x198)[0x7f54c2ddbb98]
/usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so(_ZN3sys13begin_unwind_16_89e154cd091567114_0$x2e8$x2dpreE+0x569)[0x7f54c48c8ad9]
/usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so(+0x10f562)[0x7f54c48c8562]
/usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so(+0x10f491)[0x7f54c48c8491]
/usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so(+0x10f514)[0x7f54c48c8514]
/usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so(+0x10f491)[0x7f54c48c8491]
/usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so(_ZN3sys14__extensions__10meth_110469fail_with17_d96679812a86c36714_0$x2e8$x2dpreE+0x72)[0x7f54c482d552]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN6middle2ty9ty_vstore17_38d23a9eb69ab73c14_0$x2e8$x2dpreE+0x4dd)[0x7f54c32f47cd]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN6middle6typeck5check8regionck9guarantor24link_ref_bindings_in_pat16_6073b9a662ee3aa14_0$x2e8$x2dpreE+0x81)[0x7f54c33f7c21]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN6middle6typeck5check8regionck9guarantor9for_match17_d17bcb234fd88e9014_0$x2e8$x2dpreE+0x1b0)[0x7f54c33f2f60]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN6middle6typeck5check8regionck10visit_expr17_9db18aacb0fdcc9514_0$x2e8$x2dpreE+0x1a92)[0x7f54c33e2a82]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(+0x19700a)[0x7f54c31a600a]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(+0x3d9955)[0x7f54c33e8955]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN6middle6typeck5check8regionck11visit_block17_885fcbeb578be9b114_0$x2e8$x2dpreE+0x1e2)[0x7f54c33e4b92]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN6middle6typeck5check8regionck11regionck_fn17_61b962367e9fa01314_0$x2e8$x2dpreE+0x15e)[0x7f54c33de5be]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN6middle6typeck5check13check_bare_fn17_1c657962473dc02514_0$x2e8$x2dpreE+0x216)[0x7f54c3414966]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN6middle6typeck5check10check_item16_dbd3034b2862fe914_0$x2e8$x2dpreE+0x182)[0x7f54c34140f2]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(+0x404df1)[0x7f54c3413df1]
/usr/local/bin/../lib/libsyntax-64629f7f0c6a9bc-0.8-pre.so(_ZN5visit17mk_simple_visitor6v_item16_408f6381246154114_0$x2e8$x2dpreE+0x52)[0x7f54c3de6e02]
/usr/local/bin/../lib/libsyntax-64629f7f0c6a9bc-0.8-pre.so(+0x1131f8)[0x7f54c3de91f8]
/usr/local/bin/../lib/libsyntax-64629f7f0c6a9bc-0.8-pre.so(+0xe0ae2)[0x7f54c3db6ae2]
/usr/local/bin/../lib/libsyntax-64629f7f0c6a9bc-0.8-pre.so(_ZN5visit17mk_simple_visitor5v_mod16_587699edee53db214_0$x2e8$x2dpreE+0xc8)[0x7f54c3de6888]
/usr/local/bin/../lib/libsyntax-64629f7f0c6a9bc-0.8-pre.so(+0x112f04)[0x7f54c3de8f04]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(+0x2509b4)[0x7f54c325f9b4]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN6middle6typeck5check16check_item_types17_91daba43ed2069b514_0$x2e8$x2dpreE+0x3fa)[0x7f54c3413c2a]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(+0x50f5ce)[0x7f54c351e5ce]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN6middle6typeck11check_crate17_b7c51d96916a7e8314_0$x2e8$x2dpreE+0x228)[0x7f54c351e0c8]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN6driver6driver12compile_rest17_82e12ee66e78e62214_0$x2e8$x2dpreE+0x12eb)[0x7f54c37ddeeb]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN6driver6driver12compile_upto16_f92ef906da6c49014_0$x2e8$x2dpreE+0x134)[0x7f54c37e1f54]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN6driver6driver13compile_input16_27221bf3985d3b414_0$x2e8$x2dpreE+0xd5)[0x7f54c37e22e5]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN12run_compiler17_9bb396fcbdcc8f6d14_0$x2e8$x2dpreE+0x18f4)[0x7f54c3805c34]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(+0x80cc7e)[0x7f54c381bc7e]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(+0x809a04)[0x7f54c3818a04]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(+0x8010c2)[0x7f54c38100c2]
/usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so(+0xe331f)[0x7f54c489c31f]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x22)[0x7f54c2dda522]
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /home/huon/rust/src/librustc/rustc.rs:366
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7f54c2dd9beb]
/usr/local/bin/../lib/librustrt.so(+0x2b301)[0x7f54c2deb301]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x198)[0x7f54c2ddbb98]
/usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so(_ZN3sys13begin_unwind_16_89e154cd091567114_0$x2e8$x2dpreE+0x569)[0x7f54c48c8ad9]
/usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so(+0x10fc22)[0x7f54c48c8c22]
/usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so(+0x10f491)[0x7f54c48c8491]
/usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so(+0x10fbd4)[0x7f54c48c8bd4]
/usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so(+0x10f491)[0x7f54c48c8491]
/usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so(+0x8ba4c)[0x7f54c4844a4c]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN7monitor17_86dc1bf9414a80a014_0$x2e8$x2dpreE+0x2ed5)[0x7f54c38096a5]
/usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so(_ZN4main15_f3d16eaf7d573814_0$x2e8$x2dpreE+0x69)[0x7f54c381bbb9]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x22)[0x7f54c2dda522]
rust: domain main @0x903d70 root task failed
  1. Triage, still icy.

    Huon Wilson at 2013-12-19 13:08:29

  2. With ~[] and us no longer pattern matching on ~[], this is no longer reproducible. Closing.

    Erick Tryzelaar at 2014-05-11 00:45:20