<h2 dir="auto">Current (minimized) example of breakage:</h2>
<p dir="auto">(courtesy of youknowone; see comments below)</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() { let _a = [0, ..1 as uint]; }"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> _a = <span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">,</span> ..<span class="pl-c1">1</span> <span class="pl-k">as</span> <span class="pl-smi">uint</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div>
<h2 dir="auto">Original Report:</h2>
<p dir="auto">The following code causes the crash</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="enum State { ST_NULL, ST_WHITESPACE }

priv fn SomeFunction () -&gt; StateTable {
    StateTable { entry: ~[mut ~[mut ST_NULL, ..ST_WHITESPACE], ..128] }
}"><pre class="notranslate"><code class="notranslate">enum State { ST_NULL, ST_WHITESPACE }

priv fn SomeFunction () -&gt; StateTable {
    StateTable { entry: ~[mut ~[mut ST_NULL, ..ST_WHITESPACE], ..128] }
}
</code></pre></div>
<p dir="auto">The error messages are as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug"><pre class="notranslate"><code class="notranslate">error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
</code></pre></div>
<p dir="auto">It seems that the compiler does not understand <code class="notranslate">entry: ~[mut ~[mut ST_NULL, ..ST_WHITESPACE], ..128]</code>.</p>
<p dir="auto">Compiling the following program leads to an internal compiler error:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main(++args: ~[~str]) {
    let n = 1;
    let a = ~[0, ..n];
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span>++<span class="pl-s1">args</span><span class="pl-kos">:</span> ~<span class="pl-kos">[</span>~<span class="pl-smi">str</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">let</span> n = <span class="pl-c1">1</span><span class="pl-kos">;</span>
    <span class="pl-k">let</span> a = ~<span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">,</span> ..n<span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tmp % RUST_LOG=rustc=0,::rt::backtrace rustc fail.rs 
rust: task failed at 'Unsupported constant expr', /home/philipp/programming/rust-git/src/rustc/middle/const_eval.rs:351
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x5d)[0x7fd46bbf456d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(+0x31e4d)[0x7fd46bc0be4d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(upcall_fail+0x1a8)[0x7fd46bbf6e68]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(_ZN6middle10const_eval15eval_const_expr15_052f2a2040b8d23_04E+0x2f2)[0x7fd46c014f22]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(_ZN6middle2ty17eval_repeat_count16_b613c7e2c7253203_04E+0x60)[0x7fd46c0815f0]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x3afdec)[0x7fd46c1ebdec]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x689ff0)[0x7fd46c4c5ff0]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x3acef9)[0x7fd46c1e8ef9]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x689ff0)[0x7fd46c4c5ff0]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x3cac0a)[0x7fd46c206c0a]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x3cb30e)[0x7fd46c20730e]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x325cbe)[0x7fd46c161cbe]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x689ff0)[0x7fd46c4c5ff0]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x3751f0)[0x7fd46c1b11f0]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x3738f3)[0x7fd46c1af8f3]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x37114a)[0x7fd46c1ad14a]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libsyntax-84efebcb12c867a2-0.4.so(+0xae74d)[0x7fd46c95074d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libsyntax-84efebcb12c867a2-0.4.so(+0xae5b4)[0x7fd46c9505b4]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(_ZN6middle6typeck11check_crate17_f0c9dce01f38a0a13_04E+0xcf6)[0x7fd46c290776]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(_ZN6driver6driver12compile_upto17_c9ea81e17d7f15573_04E+0x1646)[0x7fd46c49b206]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x689ff0)[0x7fd46c4c5ff0]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(_ZN6driver6driver13compile_input16_f2f88af42d830dc3_04E+0xbd)[0x7fd46c49e50d]
rustc[0x408d28]
rustc[0x412084]
rustc[0x40e503]
rustc[0x40d1bc]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x76474)[0x7fd46d243474]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0xb7430)[0x7fd46d284430]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7fd46bbf4d14]
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=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /home/philipp/programming/rust-git/src/rustc/driver/rustc.rs:275
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x5d)[0x7fd46bbf456d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(+0x31e4d)[0x7fd46bc0be4d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(upcall_fail+0x1a8)[0x7fd46bbf6e68]
rustc(_rust_main+0xbf4)[0x411c54]
rustc[0x412084]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7fd46bbf4d14]
rust: domain main @0x18fb230 root task failed
rust: task failed at 'killed', /home/philipp/programming/rust-git/src/libcore/task.rs:662
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x5d)[0x7fd46bbf456d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(+0x31e4d)[0x7fd46bc0be4d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(upcall_fail+0x1a8)[0x7fd46bbf6e68]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(_ZN4task5yield16_9531951b4f79f8b3_04E+0xbd)[0x7fd46d22c5fd]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x911d6)[0x7fd46d25e1d6]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(_ZN7private11weaken_task16_245c26cb8d7b1343_04E+0xd2)[0x7fd46d25e012]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x90f0b)[0x7fd46d25df0b]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0xb7430)[0x7fd46d284430]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x90260)[0x7fd46d25d260]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x8fbfe)[0x7fd46d25cbfe]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x8f266)[0x7fd46d25c266]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x76474)[0x7fd46d243474]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0xb7430)[0x7fd46d284430]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7fd46bbf4d14]"><pre class="notranslate"><code class="notranslate">tmp % RUST_LOG=rustc=0,::rt::backtrace rustc fail.rs 
rust: task failed at 'Unsupported constant expr', /home/philipp/programming/rust-git/src/rustc/middle/const_eval.rs:351
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x5d)[0x7fd46bbf456d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(+0x31e4d)[0x7fd46bc0be4d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(upcall_fail+0x1a8)[0x7fd46bbf6e68]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(_ZN6middle10const_eval15eval_const_expr15_052f2a2040b8d23_04E+0x2f2)[0x7fd46c014f22]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(_ZN6middle2ty17eval_repeat_count16_b613c7e2c7253203_04E+0x60)[0x7fd46c0815f0]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x3afdec)[0x7fd46c1ebdec]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x689ff0)[0x7fd46c4c5ff0]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x3acef9)[0x7fd46c1e8ef9]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x689ff0)[0x7fd46c4c5ff0]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x3cac0a)[0x7fd46c206c0a]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x3cb30e)[0x7fd46c20730e]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x325cbe)[0x7fd46c161cbe]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x689ff0)[0x7fd46c4c5ff0]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x3751f0)[0x7fd46c1b11f0]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x3738f3)[0x7fd46c1af8f3]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x37114a)[0x7fd46c1ad14a]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libsyntax-84efebcb12c867a2-0.4.so(+0xae74d)[0x7fd46c95074d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libsyntax-84efebcb12c867a2-0.4.so(+0xae5b4)[0x7fd46c9505b4]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(_ZN6middle6typeck11check_crate17_f0c9dce01f38a0a13_04E+0xcf6)[0x7fd46c290776]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(_ZN6driver6driver12compile_upto17_c9ea81e17d7f15573_04E+0x1646)[0x7fd46c49b206]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(+0x689ff0)[0x7fd46c4c5ff0]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustc-c84825241471686d-0.4.so(_ZN6driver6driver13compile_input16_f2f88af42d830dc3_04E+0xbd)[0x7fd46c49e50d]
rustc[0x408d28]
rustc[0x412084]
rustc[0x40e503]
rustc[0x40d1bc]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x76474)[0x7fd46d243474]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0xb7430)[0x7fd46d284430]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7fd46bbf4d14]
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=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /home/philipp/programming/rust-git/src/rustc/driver/rustc.rs:275
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x5d)[0x7fd46bbf456d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(+0x31e4d)[0x7fd46bc0be4d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(upcall_fail+0x1a8)[0x7fd46bbf6e68]
rustc(_rust_main+0xbf4)[0x411c54]
rustc[0x412084]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7fd46bbf4d14]
rust: domain main @0x18fb230 root task failed
rust: task failed at 'killed', /home/philipp/programming/rust-git/src/libcore/task.rs:662
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x5d)[0x7fd46bbf456d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(+0x31e4d)[0x7fd46bc0be4d]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(upcall_fail+0x1a8)[0x7fd46bbf6e68]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(_ZN4task5yield16_9531951b4f79f8b3_04E+0xbd)[0x7fd46d22c5fd]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x911d6)[0x7fd46d25e1d6]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(_ZN7private11weaken_task16_245c26cb8d7b1343_04E+0xd2)[0x7fd46d25e012]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x90f0b)[0x7fd46d25df0b]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0xb7430)[0x7fd46d284430]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x90260)[0x7fd46d25d260]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x8fbfe)[0x7fd46d25cbfe]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x8f266)[0x7fd46d25c266]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x76474)[0x7fd46d243474]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0xb7430)[0x7fd46d284430]
/home/philipp/programming/rust-git/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7fd46bbf4d14]
</code></pre></div>