<p dir="auto">rustc 1.0.0 (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/a59de37e99060162a2674e3ff45409ac73595c0e/hovercard" href="https://github.com/rust-lang/rust/commit/a59de37e99060162a2674e3ff45409ac73595c0e"><tt>a59de37</tt></a> 2015-05-13) (built 2015-05-14)<br>
binary: rustc<br>
commit-hash: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/a59de37e99060162a2674e3ff45409ac73595c0e/hovercard" href="https://github.com/rust-lang/rust/commit/a59de37e99060162a2674e3ff45409ac73595c0e"><tt>a59de37</tt></a><br>
commit-date: 2015-05-13<br>
build-date: 2015-05-14<br>
host: x86_64-unknown-linux-gnu<br>
release: 1.0.0</p>
<p dir="auto">I wanted to check this code successfully compiles. Gave a "cargo test" instead of "build", and kaboom.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#[test]
fn yerler() {
    fn utule(arr: &amp;[[u8]]) -&gt; [u8; 81] {
        let mut newarr = [0_u8; 81];
        for i in 0..10 {
            for j in 0..10 {
                newarr[i*9+j] = arr[i][j];
            }
        }
        newarr
    }
}"><pre class="notranslate"><span class="pl-c1">#<span class="pl-kos">[</span>test<span class="pl-kos">]</span></span>
<span class="pl-k">fn</span> <span class="pl-en">yerler</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">fn</span> <span class="pl-en">utule</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-kos">[</span><span class="pl-kos">[</span><span class="pl-smi">u8</span><span class="pl-kos">]</span><span class="pl-kos">]</span><span class="pl-kos">)</span> -&gt; <span class="pl-kos">[</span><span class="pl-smi">u8</span><span class="pl-kos">;</span> <span class="pl-c1">81</span><span class="pl-kos">]</span> <span class="pl-kos">{</span>
        <span class="pl-k">let</span> <span class="pl-k">mut</span> newarr = <span class="pl-kos">[</span><span class="pl-c1">0_u8</span><span class="pl-kos">;</span> <span class="pl-c1">81</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
        <span class="pl-k">for</span> i <span class="pl-k">in</span> <span class="pl-c1">0</span>..<span class="pl-c1">10</span> <span class="pl-kos">{</span>
            <span class="pl-k">for</span> j <span class="pl-k">in</span> <span class="pl-c1">0</span>..<span class="pl-c1">10</span> <span class="pl-kos">{</span>
                newarr<span class="pl-kos">[</span>i<span class="pl-c1">*</span><span class="pl-c1">9</span>+j<span class="pl-kos">]</span> = arr<span class="pl-kos">[</span>i<span class="pl-kos">]</span><span class="pl-kos">[</span>j<span class="pl-kos">]</span><span class="pl-kos">;</span>
            <span class="pl-kos">}</span>
        <span class="pl-kos">}</span>
        newarr
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="thread 'rustc' panicked at 'assertion failed: slice_layout_is_correct(cx, &amp;member_llvm_types[..], element_type)', /home/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-linux/build/src/librustc_trans/trans/debuginfo.rs:2810

stack backtrace:
   1:     0x7f4abb29e449 - sys::backtrace::write::hbc46dc0cfb3b9537d4r
   2:     0x7f4abb2a6156 - panicking::on_panic::h74d3c14d86c58ac8jrw
   3:     0x7f4abb269462 - rt::unwind::begin_unwind_inner::h382cea404b11eb00t6v
   4:     0x7f4aba96437e - rt::unwind::begin_unwind::h11527883117899559464
   5:     0x7f4abaa65f33 - trans::debuginfo::vec_slice_metadata::hf94e0b5f0c2f2a50cgy
   6:     0x7f4abaa517fc - trans::debuginfo::type_metadata::h61fa8cb587a59ac0Ioy
   7:     0x7f4abaa664c0 - trans::debuginfo::subroutine_type_metadata::h0a8adba26e117853iky
   8:     0x7f4abaa511d4 - trans::debuginfo::type_metadata::h61fa8cb587a59ac0Ioy
   9:     0x7f4aba9bd8b6 - trans::debuginfo::create_function_debug_context::hce33e3e89c0b549eG0w
  10:     0x7f4aba9bbd16 - trans::base::new_fn_ctxt::hc47263521fb5ebc7Djh
  11:     0x7f4aba9c4f10 - trans::base::trans_closure::h8e5687f4ccb96c5eLCh
  12:     0x7f4aba9c90ea - trans::base::trans_fn::h0bc8fb6dbe17d6adtNh
  13:     0x7f4aba9cc177 - trans::base::trans_item::h4f9c99b1e4474396Fbi
  14:     0x7f4aba9d2ed5 - visit::walk_block::h14547825370956947583
  15:     0x7f4aba9cca16 - trans::base::trans_item::h4f9c99b1e4474396Fbi
  16:     0x7f4aba9da56d - trans::base::trans_crate::haa02506df24d5efcF0i
  17:     0x7f4abb7ec0fa - driver::phase_4_translate_to_llvm::h86d6fb84c5c936d5hOa
  18:     0x7f4abb7c3faa - driver::compile_input::hb78754f2f33c01efQba
  19:     0x7f4abb8854d1 - run_compiler::h258d36d5501c1cdfz4b
  20:     0x7f4abb883122 - boxed::F.FnBox&lt;A&gt;::call_box::h7239693171334256553
  21:     0x7f4abb882659 - rt::unwind::try::try_fn::h14329119008520845439
  22:     0x7f4abb318ac8 - rust_try_inner
  23:     0x7f4abb318ab5 - rust_try
  24:     0x7f4abb882908 - boxed::F.FnBox&lt;A&gt;::call_box::h17332056298259451807
  25:     0x7f4abb2a5041 - sys::thread::create::thread_start::h490278b5c3c0b49faqv
  26:     0x7f4ab5b2cdf4 - start_thread
  27:     0x7f4abaeef1ac - __clone
  28:     0x0 - &lt;unknown&gt;"><pre class="notranslate"><code class="notranslate">thread 'rustc' panicked at 'assertion failed: slice_layout_is_correct(cx, &amp;member_llvm_types[..], element_type)', /home/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-linux/build/src/librustc_trans/trans/debuginfo.rs:2810

stack backtrace:
   1:     0x7f4abb29e449 - sys::backtrace::write::hbc46dc0cfb3b9537d4r
   2:     0x7f4abb2a6156 - panicking::on_panic::h74d3c14d86c58ac8jrw
   3:     0x7f4abb269462 - rt::unwind::begin_unwind_inner::h382cea404b11eb00t6v
   4:     0x7f4aba96437e - rt::unwind::begin_unwind::h11527883117899559464
   5:     0x7f4abaa65f33 - trans::debuginfo::vec_slice_metadata::hf94e0b5f0c2f2a50cgy
   6:     0x7f4abaa517fc - trans::debuginfo::type_metadata::h61fa8cb587a59ac0Ioy
   7:     0x7f4abaa664c0 - trans::debuginfo::subroutine_type_metadata::h0a8adba26e117853iky
   8:     0x7f4abaa511d4 - trans::debuginfo::type_metadata::h61fa8cb587a59ac0Ioy
   9:     0x7f4aba9bd8b6 - trans::debuginfo::create_function_debug_context::hce33e3e89c0b549eG0w
  10:     0x7f4aba9bbd16 - trans::base::new_fn_ctxt::hc47263521fb5ebc7Djh
  11:     0x7f4aba9c4f10 - trans::base::trans_closure::h8e5687f4ccb96c5eLCh
  12:     0x7f4aba9c90ea - trans::base::trans_fn::h0bc8fb6dbe17d6adtNh
  13:     0x7f4aba9cc177 - trans::base::trans_item::h4f9c99b1e4474396Fbi
  14:     0x7f4aba9d2ed5 - visit::walk_block::h14547825370956947583
  15:     0x7f4aba9cca16 - trans::base::trans_item::h4f9c99b1e4474396Fbi
  16:     0x7f4aba9da56d - trans::base::trans_crate::haa02506df24d5efcF0i
  17:     0x7f4abb7ec0fa - driver::phase_4_translate_to_llvm::h86d6fb84c5c936d5hOa
  18:     0x7f4abb7c3faa - driver::compile_input::hb78754f2f33c01efQba
  19:     0x7f4abb8854d1 - run_compiler::h258d36d5501c1cdfz4b
  20:     0x7f4abb883122 - boxed::F.FnBox&lt;A&gt;::call_box::h7239693171334256553
  21:     0x7f4abb882659 - rt::unwind::try::try_fn::h14329119008520845439
  22:     0x7f4abb318ac8 - rust_try_inner
  23:     0x7f4abb318ab5 - rust_try
  24:     0x7f4abb882908 - boxed::F.FnBox&lt;A&gt;::call_box::h17332056298259451807
  25:     0x7f4abb2a5041 - sys::thread::create::thread_start::h490278b5c3c0b49faqv
  26:     0x7f4ab5b2cdf4 - start_thread
  27:     0x7f4abaeef1ac - __clone
  28:     0x0 - &lt;unknown&gt;
</code></pre></div>
<p dir="auto">Hi Folks,</p>
<p dir="auto">Just ran into a compiler panic.  I'm still learning rust, so it's probably related to a stupid syntax error on my part, but rustc suggested I file a bug report, so here I am...</p>
<p dir="auto">Here's the error:</p>
<p dir="auto">thread 'rustc' panicked at 'assertion failed: slice_layout_is_correct(cx, &amp;member_llvm_types[..], element_type)', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_trans/trans/debuginfo.rs:2810</p>
<p dir="auto">Here's the code I was writing:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    pub fn aggregate(&amp;self, group_column: &amp;str, sum_columns: &amp;[str]) {

    }"><pre class="notranslate"><code class="notranslate">    pub fn aggregate(&amp;self, group_column: &amp;str, sum_columns: &amp;[str]) {

    }
</code></pre></div>
<p dir="auto">Here's the backtrace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="   1:     0x7f2103105f39 - sys::backtrace::write::h7638fca3b07af337rVs
   2:     0x7f210310dbb6 - panicking::on_panic::h64a1f0366c6b8a23mkx
   3:     0x7f21030ca912 - rt::unwind::begin_unwind_inner::hcaa5609c9e3078adwZw
   4:     0x7f2101e5b28e - rt::unwind::begin_unwind::h15509594317540694492
   5:     0x7f2101f5a843 - trans::debuginfo::vec_slice_metadata::hfcdfde7a231fb874ehy
   6:     0x7f2101f460bc - trans::debuginfo::type_metadata::hadf1ae524fc7b529Kpy
   7:     0x7f2101f5add0 - trans::debuginfo::subroutine_type_metadata::hd6ba8b12e5430450kly
   8:     0x7f2101f45a94 - trans::debuginfo::type_metadata::hadf1ae524fc7b529Kpy
   9:     0x7f2101eb39a6 - trans::debuginfo::create_function_debug_context::h4a389096a1ba01b1I1w
  10:     0x7f2101eb1f7f - trans::base::new_fn_ctxt::h5648354326e8de67tkh
  11:     0x7f2101ebaf72 - trans::base::trans_closure::h0dc61076718b152eBDh
  12:     0x7f2101ebef8a - trans::base::trans_fn::h017a63e4b4f1d383jOh
  13:     0x7f2101ec2ad4 - trans::base::trans_item::h694a5c0c3e92277bvci
  14:     0x7f2101ec2948 - trans::base::trans_item::h694a5c0c3e92277bvci
  15:     0x7f2101ec2948 - trans::base::trans_item::h694a5c0c3e92277bvci
  16:     0x7f2101ed03bd - trans::base::trans_crate::h93b35940c9d58579v1i
  17:     0x7f2103675d5a - driver::phase_4_translate_to_llvm::h0cea9caf6133630enOa
  18:     0x7f210364e05b - driver::compile_input::h4642f691e22278cbQba
  19:     0x7f210370e331 - run_compiler::he528ba831532b90aF4b
  20:     0x7f210370bf82 - boxed::F.FnBox&lt;A&gt;::call_box::h13568337174014462877
  21:     0x7f210370b4b9 - rt::unwind::try::try_fn::h15381261312250239500
  22:     0x7f2103185528 - rust_try_inner
  23:     0x7f2103185515 - rust_try
  24:     0x7f210370b768 - boxed::F.FnBox&lt;A&gt;::call_box::h6713016946069099629
  25:     0x7f210310cac1 - sys::thread::create::thread_start::hbe89fbdfc755452dxjw
  26:     0x7f20fd1b7181 - start_thread
  27:     0x7f2102d4347c - __clone
  28:                0x0 - &lt;unknown&gt;"><pre class="notranslate"><code class="notranslate">   1:     0x7f2103105f39 - sys::backtrace::write::h7638fca3b07af337rVs
   2:     0x7f210310dbb6 - panicking::on_panic::h64a1f0366c6b8a23mkx
   3:     0x7f21030ca912 - rt::unwind::begin_unwind_inner::hcaa5609c9e3078adwZw
   4:     0x7f2101e5b28e - rt::unwind::begin_unwind::h15509594317540694492
   5:     0x7f2101f5a843 - trans::debuginfo::vec_slice_metadata::hfcdfde7a231fb874ehy
   6:     0x7f2101f460bc - trans::debuginfo::type_metadata::hadf1ae524fc7b529Kpy
   7:     0x7f2101f5add0 - trans::debuginfo::subroutine_type_metadata::hd6ba8b12e5430450kly
   8:     0x7f2101f45a94 - trans::debuginfo::type_metadata::hadf1ae524fc7b529Kpy
   9:     0x7f2101eb39a6 - trans::debuginfo::create_function_debug_context::h4a389096a1ba01b1I1w
  10:     0x7f2101eb1f7f - trans::base::new_fn_ctxt::h5648354326e8de67tkh
  11:     0x7f2101ebaf72 - trans::base::trans_closure::h0dc61076718b152eBDh
  12:     0x7f2101ebef8a - trans::base::trans_fn::h017a63e4b4f1d383jOh
  13:     0x7f2101ec2ad4 - trans::base::trans_item::h694a5c0c3e92277bvci
  14:     0x7f2101ec2948 - trans::base::trans_item::h694a5c0c3e92277bvci
  15:     0x7f2101ec2948 - trans::base::trans_item::h694a5c0c3e92277bvci
  16:     0x7f2101ed03bd - trans::base::trans_crate::h93b35940c9d58579v1i
  17:     0x7f2103675d5a - driver::phase_4_translate_to_llvm::h0cea9caf6133630enOa
  18:     0x7f210364e05b - driver::compile_input::h4642f691e22278cbQba
  19:     0x7f210370e331 - run_compiler::he528ba831532b90aF4b
  20:     0x7f210370bf82 - boxed::F.FnBox&lt;A&gt;::call_box::h13568337174014462877
  21:     0x7f210370b4b9 - rt::unwind::try::try_fn::h15381261312250239500
  22:     0x7f2103185528 - rust_try_inner
  23:     0x7f2103185515 - rust_try
  24:     0x7f210370b768 - boxed::F.FnBox&lt;A&gt;::call_box::h6713016946069099629
  25:     0x7f210310cac1 - sys::thread::create::thread_start::hbe89fbdfc755452dxjw
  26:     0x7f20fd1b7181 - start_thread
  27:     0x7f2102d4347c - __clone
  28:                0x0 - &lt;unknown&gt;
</code></pre></div>
<p dir="auto">Other Details:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc --version --verbose
rustc 1.0.0-nightly (2baf34825 2015-04-21) (built 2015-04-22)
binary: rustc
commit-hash: 2baf3482537f5a245a9c17ca730398f1a8b001d7
commit-date: 2015-04-21
build-date: 2015-04-22
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly"><pre class="notranslate"><code class="notranslate">rustc --version --verbose
rustc 1.0.0-nightly (2baf34825 2015-04-21) (built 2015-04-22)
binary: rustc
commit-hash: 2baf3482537f5a245a9c17ca730398f1a8b001d7
commit-date: 2015-04-21
build-date: 2015-04-22
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly
</code></pre></div>