<p dir="auto">This snippet: (<a href="http://is.gd/KI4QhD" rel="nofollow">Playpen link</a>)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#![allow(unstable)]

extern crate test;

fn main() {
    let a: Vec&lt;u8&gt; = Vec::with_capacity(::std::usize::MAX);
    ::test::black_box(a);
}"><pre class="notranslate"><code class="notranslate">#![allow(unstable)]

extern crate test;

fn main() {
    let a: Vec&lt;u8&gt; = Vec::with_capacity(::std::usize::MAX);
    ::test::black_box(a);
}
</code></pre></div>
<p dir="auto">Causes the program to close with a SIGILL (Illegal instruction) error. I would have expected something like a SIGSEGV instead.</p>
<p dir="auto">I get an ICE compiling this function:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use std::num;
use std::num::Int;

/// Iterates the cumulative sum
pub fn cumulative_sum&lt;T, I&gt;(iter: I) -&gt; std::iter::Scan&lt;'static, T, T, I, T&gt;
where T: Clone + num::Int + Add&lt;T, T&gt;, I: Iterator&lt;T&gt; {
    let z: T = num::Int::zero();
    iter.scan(z, |acc, x| {
        *acc = *acc + x;
        Some(acc.clone())
    })
}"><pre class="notranslate"><span class="pl-k">use</span> std<span class="pl-kos">::</span>num<span class="pl-kos">;</span>
<span class="pl-k">use</span> std<span class="pl-kos">::</span>num<span class="pl-kos">::</span><span class="pl-v">Int</span><span class="pl-kos">;</span>

<span class="pl-c">/// Iterates the cumulative sum</span>
<span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">cumulative_sum</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">I</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">iter</span><span class="pl-kos">:</span> <span class="pl-smi">I</span><span class="pl-kos">)</span> -&gt; std<span class="pl-kos">::</span>iter<span class="pl-kos">::</span><span class="pl-smi">Scan</span><span class="pl-kos">&lt;</span><span class="pl-c1">'</span><span class="pl-ent">static</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">I</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">&gt;</span>
<span class="pl-k">where</span> <span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-smi">Clone</span> + num<span class="pl-kos">::</span><span class="pl-smi">Int</span> + <span class="pl-smi">Add</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> <span class="pl-smi">I</span><span class="pl-kos">:</span> <span class="pl-smi">Iterator</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">let</span> z<span class="pl-kos">:</span> <span class="pl-smi">T</span> = num<span class="pl-kos">::</span><span class="pl-smi">Int</span><span class="pl-kos">::</span><span class="pl-en">zero</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    iter<span class="pl-kos">.</span><span class="pl-en">scan</span><span class="pl-kos">(</span>z<span class="pl-kos">,</span> |acc<span class="pl-kos">,</span> x| <span class="pl-kos">{</span>
        <span class="pl-c1">*</span>acc = <span class="pl-c1">*</span>acc + x<span class="pl-kos">;</span>
        <span class="pl-v">Some</span><span class="pl-kos">(</span>acc<span class="pl-kos">.</span><span class="pl-en">clone</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span>
    <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">I'll grant it's odd and unecessary to have imported <code class="notranslate">Int</code> yet still refer to <code class="notranslate">num::Int</code>, but apparently this hits a corner case the compiler isn't prepared for.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc --version
rustc 0.13.0-dev (88c743def 2014-11-17 14:22:03 +0000)
$ RUST_BACKTRACE=1 rustc --crate-type lib unused_qual_crash.rs 
unused_qual_crash.rs:6:18: 6:26 error: internal compiler error: unprocessed lint unused_qualifications at unknown node (id=25): unnecessary qualification
unused_qual_crash.rs:6 where T: Clone + num::Int + Add&lt;T, T&gt;, I: Iterator&lt;T&gt; {
                                        ^~~~~~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' panicked at 'Box&lt;Any&gt;', [...]/rust/src/libsyntax/diagnostic.rs:116

stack backtrace:
   1:     0x7fb45ed2de90 - rt::backtrace::imp::write::h63476d4ec99e2e5bBSs
   2:     0x7fb45ed30b20 - failure::on_fail::hef753ccd1a60125cnet
   3:     0x7fb45f4fb520 - unwind::begin_unwind_inner::h20b00ee5cda00f1eKad
   4:     0x7fb45dc8d600 - unwind::begin_unwind::h4448905161337545584
   5:     0x7fb45dc8d590 - diagnostic::SpanHandler::span_bug::hb65fb107581599d5P3F
   6:     0x7fb4601c17d0 - lint::context::check_crate::he3a56a83f9bf35f1fWL
   7:     0x7fb45f90b330 - util::common::time::h4558342479339418325
   8:     0x7fb46016dba0 - driver::driver::phase_3_run_analysis_passes::he8cb5260bcd2aa4cYzD
   9:     0x7fb460169030 - driver::driver::compile_input::hc51acae736c7c311IgD
  10:     0x7fb4601e76f0 - driver::run_compiler::h110d0899a23a77f34bH
  11:     0x7fb4601e75e0 - driver::run::closure.167591
  12:     0x7fb45f924f40 - task::TaskBuilder&lt;S&gt;::try_future::closure.105067
  13:     0x7fb45f924d00 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.105036
  14:     0x7fb460a4ba60 - task::NativeSpawner.Spawner::spawn::closure.2461
  15:     0x7fb45f55f0d0 - rust_try_inner
  16:     0x7fb45f55f0c0 - rust_try
  17:     0x7fb45f4f8ea0 - unwind::try::h5a55025d92b76095mZc
  18:     0x7fb45f4f8d00 - task::Task::run::h2394b9dc89bd77b2c5b
  19:     0x7fb460a4b7c0 - task::NativeSpawner.Spawner::spawn::closure.2385
  20:     0x7fb45f4fa560 - thread::thread_start::hd6b918d48ba54e58iqc
  21:     0x7fb45a7a6e20 - start_thread
  22:     0x7fb45f1c0b59 - clone
  23:                0x0 - &lt;unknown&gt;"><pre class="notranslate"><code class="notranslate">$ rustc --version
rustc 0.13.0-dev (88c743def 2014-11-17 14:22:03 +0000)
$ RUST_BACKTRACE=1 rustc --crate-type lib unused_qual_crash.rs 
unused_qual_crash.rs:6:18: 6:26 error: internal compiler error: unprocessed lint unused_qualifications at unknown node (id=25): unnecessary qualification
unused_qual_crash.rs:6 where T: Clone + num::Int + Add&lt;T, T&gt;, I: Iterator&lt;T&gt; {
                                        ^~~~~~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' panicked at 'Box&lt;Any&gt;', [...]/rust/src/libsyntax/diagnostic.rs:116

stack backtrace:
   1:     0x7fb45ed2de90 - rt::backtrace::imp::write::h63476d4ec99e2e5bBSs
   2:     0x7fb45ed30b20 - failure::on_fail::hef753ccd1a60125cnet
   3:     0x7fb45f4fb520 - unwind::begin_unwind_inner::h20b00ee5cda00f1eKad
   4:     0x7fb45dc8d600 - unwind::begin_unwind::h4448905161337545584
   5:     0x7fb45dc8d590 - diagnostic::SpanHandler::span_bug::hb65fb107581599d5P3F
   6:     0x7fb4601c17d0 - lint::context::check_crate::he3a56a83f9bf35f1fWL
   7:     0x7fb45f90b330 - util::common::time::h4558342479339418325
   8:     0x7fb46016dba0 - driver::driver::phase_3_run_analysis_passes::he8cb5260bcd2aa4cYzD
   9:     0x7fb460169030 - driver::driver::compile_input::hc51acae736c7c311IgD
  10:     0x7fb4601e76f0 - driver::run_compiler::h110d0899a23a77f34bH
  11:     0x7fb4601e75e0 - driver::run::closure.167591
  12:     0x7fb45f924f40 - task::TaskBuilder&lt;S&gt;::try_future::closure.105067
  13:     0x7fb45f924d00 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.105036
  14:     0x7fb460a4ba60 - task::NativeSpawner.Spawner::spawn::closure.2461
  15:     0x7fb45f55f0d0 - rust_try_inner
  16:     0x7fb45f55f0c0 - rust_try
  17:     0x7fb45f4f8ea0 - unwind::try::h5a55025d92b76095mZc
  18:     0x7fb45f4f8d00 - task::Task::run::h2394b9dc89bd77b2c5b
  19:     0x7fb460a4b7c0 - task::NativeSpawner.Spawner::spawn::closure.2385
  20:     0x7fb45f4fa560 - thread::thread_start::hd6b918d48ba54e58iqc
  21:     0x7fb45a7a6e20 - start_thread
  22:     0x7fb45f1c0b59 - clone
  23:                0x0 - &lt;unknown&gt;
</code></pre></div>
<p dir="auto">The flagged qualification can't actually be removed, because it's needed for <code class="notranslate">zero()</code>, but things work fine if I change it from <code class="notranslate">num::Int</code> to just <code class="notranslate">Int</code>.</p>