<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ruben@MacBook-Pro src]$ rustc --version=verbose
rustc 0.13.0-nightly (40fb87d40 2014-11-10 23:01:57 +0000)
binary: rustc
commit-hash: 40fb87d40f681f5356af42175fc7b85da387f037
commit-date: 2014-11-10 23:01:57 +0000
host: x86_64-apple-darwin
release: 0.13.0-nightly"><pre class="notranslate"><code class="notranslate">[ruben@MacBook-Pro src]$ rustc --version=verbose
rustc 0.13.0-nightly (40fb87d40 2014-11-10 23:01:57 +0000)
binary: rustc
commit-hash: 40fb87d40f681f5356af42175fc7b85da387f037
commit-date: 2014-11-10 23:01:57 +0000
host: x86_64-apple-darwin
release: 0.13.0-nightly
</code></pre></div>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="trait Adder&lt;Number&gt; {
  fn sum(&amp;self, summands: &amp;[Number]) -&gt; Number;
}

struct Calculator {
  foo: int,
}

impl Adder&lt;int&gt; for Calculator {

  fn sum(&amp;self, summands: &amp;[int]) -&gt; int {
    println!(&quot;sum int&quot;);
    let mut result = 0i;
    for num in summands.iter() {
      result += *num;
    }
    result
  }
}

impl Adder&lt;f32&gt; for Calculator {

  fn sum(&amp;self, summands: &amp;[f32]) -&gt; f32 {
    println!(&quot;sum f32&quot;);
    let mut result = 0f32;
    for num in summands.iter() {
      result += *num;
    }
    result
  }
}


fn main() {
  let calc = Calculator { foo: 4711 };
  println!(&quot;1 + 1 = {}&quot;, calc.sum([1,1].as_slice()));

  // raises the compiler error
  println!(&quot;1.0 + 2.3 = {}&quot;, calc.sum([1.0,2.3].as_slice()));
  // compiles and runs properly
  //println!(&quot;1.0 + 2.3 = {}&quot;, calc.sum([1.0f32,2.3f32].as_slice()));
}"><pre class="notranslate"><span class="pl-k">trait</span> <span class="pl-smi">Adder</span><span class="pl-kos">&lt;</span><span class="pl-smi">Number</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span>
  <span class="pl-k">fn</span> <span class="pl-en">sum</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-smi">self</span><span class="pl-kos">,</span> <span class="pl-s1">summands</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-kos">[</span><span class="pl-smi">Number</span><span class="pl-kos">]</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Number</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">struct</span> <span class="pl-smi">Calculator</span> <span class="pl-kos">{</span>
  <span class="pl-c1">foo</span><span class="pl-kos">:</span> <span class="pl-smi">int</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span>

<span class="pl-k">impl</span> <span class="pl-smi">Adder</span><span class="pl-kos">&lt;</span><span class="pl-smi">int</span><span class="pl-kos">&gt;</span> <span class="pl-k">for</span> <span class="pl-smi">Calculator</span> <span class="pl-kos">{</span>

  <span class="pl-k">fn</span> <span class="pl-en">sum</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-smi">self</span><span class="pl-kos">,</span> <span class="pl-s1">summands</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-kos">[</span><span class="pl-smi">int</span><span class="pl-kos">]</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">int</span> <span class="pl-kos">{</span>
    <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"sum int"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-k">let</span> <span class="pl-k">mut</span> result = <span class="pl-c1">0</span>i<span class="pl-kos">;</span>
    <span class="pl-k">for</span> num <span class="pl-k">in</span> summands<span class="pl-kos">.</span><span class="pl-en">iter</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      result += <span class="pl-c1">*</span>num<span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
    result
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span>

<span class="pl-k">impl</span> <span class="pl-smi">Adder</span><span class="pl-kos">&lt;</span><span class="pl-smi">f32</span><span class="pl-kos">&gt;</span> <span class="pl-k">for</span> <span class="pl-smi">Calculator</span> <span class="pl-kos">{</span>

  <span class="pl-k">fn</span> <span class="pl-en">sum</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-smi">self</span><span class="pl-kos">,</span> <span class="pl-s1">summands</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-kos">[</span><span class="pl-smi">f32</span><span class="pl-kos">]</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">f32</span> <span class="pl-kos">{</span>
    <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"sum f32"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-k">let</span> <span class="pl-k">mut</span> result = <span class="pl-c1">0f32</span><span class="pl-kos">;</span>
    <span class="pl-k">for</span> num <span class="pl-k">in</span> summands<span class="pl-kos">.</span><span class="pl-en">iter</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      result += <span class="pl-c1">*</span>num<span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
    result
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span>


<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> calc = <span class="pl-smi">Calculator</span> <span class="pl-kos">{</span> <span class="pl-c1">foo</span><span class="pl-kos">:</span> <span class="pl-c1">4711</span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
  <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"1 + 1 = {}"</span>, calc.sum<span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-c1">1</span>,<span class="pl-c1">1</span><span class="pl-kos">]</span>.as_slice<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-c">// raises the compiler error</span>
  <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"1.0 + 2.3 = {}"</span>, calc.sum<span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-c1">1.0</span>,<span class="pl-c1">2.3</span><span class="pl-kos">]</span>.as_slice<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-c">// compiles and runs properly</span>
  <span class="pl-c">//println!("1.0 + 2.3 = {}", calc.sum([1.0f32,2.3f32].as_slice()));</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: Impl DefId { krate: 0, node: 26 }:Calculator.Adder&lt;int&gt; was matchable against Obligation(trait_ref=&lt;_ : Adder&lt;_&gt;&gt;,depth=0) but now is not
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;', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:175

stack backtrace:
   1:        0x11011e01f - rt::backtrace::imp::write::h37f6e30fade15cb76mt
   2:        0x1101211a7 - failure::on_fail::h4075de659ea4adb9VDt
   3:        0x1103a4415 - unwind::begin_unwind_inner::h9e12d6856ac2af42j1c
   4:        0x10e086757 - unwind::begin_unwind::h887212781071489879
   5:        0x10e086f93 - diagnostic::Handler::bug::he58e2d0573e8d5d4L5F
   6:        0x10d105271 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::rematch_impl::h35320cfc53204d2fFbZ
   7:        0x10d0f3607 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::confirm_candidate::hb7278faaf8bd08bdDRY
   8:        0x10d0ea1b7 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::select::h20d24e63da941032znX
   9:        0x10d0e8e86 - middle::traits::fulfill::FulfillmentContext::select::h4f9eb03bbb3d4aa6gUW
  10:        0x10d0e8656 - middle::traits::fulfill::FulfillmentContext::select_where_possible::h212cad5c41e6ff5evTW
  11:        0x10d0014d2 - middle::traits::fulfill::FulfillmentContext::select_all_or_error::ha09a57d720916db7iRW
  12:        0x10d26dc78 - middle::typeck::check::vtable::select_all_fcx_obligations_or_error::h4291cb6f90f0ee15K7N
  13:        0x10d2c5ccb - middle::typeck::check::check_bare_fn::hec13c0cf792a848da8V
  14:        0x10d2c1e1d - middle::typeck::check::check_item::h7dd222d42ec19845jsW
  15:        0x10d2c5b10 - middle::typeck::check::check_item_types::hdbb49e408a7799c1k7V
  16:        0x10cdd1156 - util::common::time::h3942551398258420223
  17:        0x10d5d1eee - middle::typeck::check_crate::hcb0ab152bef1200chup
  18:        0x10d639d9f - driver::driver::phase_3_run_analysis_passes::hc02fc7265031485eIdC
  19:        0x10d634bd8 - driver::driver::compile_input::h2ba3685ec9df4f6btUB
  20:        0x10d6b23ed - driver::run_compiler::h6e93cd8bbb72fd50KKF
  21:        0x10d6b092e - driver::run::closure.146334
  22:        0x10cde940b - task::TaskBuilder&lt;S&gt;::try_future::closure.104770
  23:        0x10cde9303 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.104741
  24:        0x10cda27bd - task::NativeSpawner.Spawner::spawn::closure.2551
  25:        0x110402a0c - rust_try_inner
  26:        0x1104029f6 - rust_try
  27:        0x1103a1be7 - unwind::try::h009a35089a5882701Pc
  28:        0x1103a1a7c - task::Task::run::h4878cb7b665069bf61b
  29:        0x10cda25e3 - task::NativeSpawner.Spawner::spawn::closure.2475
  30:        0x1103a32a7 - thread::thread_start::h8e83ad43ae75daab3mc
  31:     0x7fff914642fc - _pthread_body
  32:     0x7fff91464279 - _pthread_body"><pre class="notranslate"><code class="notranslate">error: internal compiler error: Impl DefId { krate: 0, node: 26 }:Calculator.Adder&lt;int&gt; was matchable against Obligation(trait_ref=&lt;_ : Adder&lt;_&gt;&gt;,depth=0) but now is not
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;', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:175

stack backtrace:
   1:        0x11011e01f - rt::backtrace::imp::write::h37f6e30fade15cb76mt
   2:        0x1101211a7 - failure::on_fail::h4075de659ea4adb9VDt
   3:        0x1103a4415 - unwind::begin_unwind_inner::h9e12d6856ac2af42j1c
   4:        0x10e086757 - unwind::begin_unwind::h887212781071489879
   5:        0x10e086f93 - diagnostic::Handler::bug::he58e2d0573e8d5d4L5F
   6:        0x10d105271 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::rematch_impl::h35320cfc53204d2fFbZ
   7:        0x10d0f3607 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::confirm_candidate::hb7278faaf8bd08bdDRY
   8:        0x10d0ea1b7 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::select::h20d24e63da941032znX
   9:        0x10d0e8e86 - middle::traits::fulfill::FulfillmentContext::select::h4f9eb03bbb3d4aa6gUW
  10:        0x10d0e8656 - middle::traits::fulfill::FulfillmentContext::select_where_possible::h212cad5c41e6ff5evTW
  11:        0x10d0014d2 - middle::traits::fulfill::FulfillmentContext::select_all_or_error::ha09a57d720916db7iRW
  12:        0x10d26dc78 - middle::typeck::check::vtable::select_all_fcx_obligations_or_error::h4291cb6f90f0ee15K7N
  13:        0x10d2c5ccb - middle::typeck::check::check_bare_fn::hec13c0cf792a848da8V
  14:        0x10d2c1e1d - middle::typeck::check::check_item::h7dd222d42ec19845jsW
  15:        0x10d2c5b10 - middle::typeck::check::check_item_types::hdbb49e408a7799c1k7V
  16:        0x10cdd1156 - util::common::time::h3942551398258420223
  17:        0x10d5d1eee - middle::typeck::check_crate::hcb0ab152bef1200chup
  18:        0x10d639d9f - driver::driver::phase_3_run_analysis_passes::hc02fc7265031485eIdC
  19:        0x10d634bd8 - driver::driver::compile_input::h2ba3685ec9df4f6btUB
  20:        0x10d6b23ed - driver::run_compiler::h6e93cd8bbb72fd50KKF
  21:        0x10d6b092e - driver::run::closure.146334
  22:        0x10cde940b - task::TaskBuilder&lt;S&gt;::try_future::closure.104770
  23:        0x10cde9303 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.104741
  24:        0x10cda27bd - task::NativeSpawner.Spawner::spawn::closure.2551
  25:        0x110402a0c - rust_try_inner
  26:        0x1104029f6 - rust_try
  27:        0x1103a1be7 - unwind::try::h009a35089a5882701Pc
  28:        0x1103a1a7c - task::Task::run::h4878cb7b665069bf61b
  29:        0x10cda25e3 - task::NativeSpawner.Spawner::spawn::closure.2475
  30:        0x1103a32a7 - thread::thread_start::h8e83ad43ae75daab3mc
  31:     0x7fff914642fc - _pthread_body
  32:     0x7fff91464279 - _pthread_body
</code></pre></div>
<p dir="auto">The simplified code below results in an ICE using the following rust version</p>
<p dir="auto">rustc 1.0.0-beta (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/9854143cba679834bc4ef932858cd5303f015a0e/hovercard" href="https://github.com/rust-lang/rust/commit/9854143cba679834bc4ef932858cd5303f015a0e"><tt>9854143</tt></a> 2015-04-02) (built 2015-04-02)<br>
binary: rustc<br>
commit-hash: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/9854143cba679834bc4ef932858cd5303f015a0e/hovercard" href="https://github.com/rust-lang/rust/commit/9854143cba679834bc4ef932858cd5303f015a0e"><tt>9854143</tt></a><br>
commit-date: 2015-04-02<br>
build-date: 2015-04-02<br>
host: x86_64-apple-darwin<br>
release: 1.0.0-beta</p>
<p dir="auto">---- CODE resulting in ICE -------</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="use std::f64;
use std::fs::File;
use std::io::{BufRead, BufReader};

#[derive(Default)]
struct Output {
  count: i64,
  min: f64,
  max: f64,
  var: f64,
  qk: f64,  // helper variables for
  mk: f64,  // variance calculation
}

fn main() {
  let file = File::open(&quot;data_random_small.txt&quot;);
  let buf = BufReader::new(file.unwrap());
  let out = compute_statistics(buf);
}


// compute_statistics computes basic statistics for the content of the
// provided BufReader
fn compute_statistics(buf: BufReader&lt;File&gt;) -&gt; Output {
  let mut out = Output { count: 0, min: f64::MAX, max: -f64::MAX, var: 0.0,
    qk: 0.0, mk: 0.0};
  for line_r in buf.lines() {
    let line = line_r.unwrap();
    let n_r = line.to_string().parse::&lt;f64&gt;();
    let n = n_r.unwrap();

    // update variance
    let k: f64 = out.count as f64;
    out.qk += (k - 1.0) * (n - out.mk) * (n - out.mk) / k;
    out.mk += (n - out.mk) / k;

    out.count += 1;
  }
  let k: f64 = out.count as f64;
  out.var = out.qk / (k-1);
  out
}"><pre class="notranslate"><code class="notranslate">use std::f64;
use std::fs::File;
use std::io::{BufRead, BufReader};

#[derive(Default)]
struct Output {
  count: i64,
  min: f64,
  max: f64,
  var: f64,
  qk: f64,  // helper variables for
  mk: f64,  // variance calculation
}

fn main() {
  let file = File::open("data_random_small.txt");
  let buf = BufReader::new(file.unwrap());
  let out = compute_statistics(buf);
}


// compute_statistics computes basic statistics for the content of the
// provided BufReader
fn compute_statistics(buf: BufReader&lt;File&gt;) -&gt; Output {
  let mut out = Output { count: 0, min: f64::MAX, max: -f64::MAX, var: 0.0,
    qk: 0.0, mk: 0.0};
  for line_r in buf.lines() {
    let line = line_r.unwrap();
    let n_r = line.to_string().parse::&lt;f64&gt;();
    let n = n_r.unwrap();

    // update variance
    let k: f64 = out.count as f64;
    out.qk += (k - 1.0) * (n - out.mk) * (n - out.mk) / k;
    out.mk += (n - out.mk) / k;

    out.count += 1;
  }
  let k: f64 = out.count as f64;
  out.var = out.qk / (k-1);
  out
}
</code></pre></div>
<hr>
<p dir="auto">The issue appears to be the second to last line. The compiler should reject (k-1). Changing this to</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="out.var = out.qk / (k-1.0);"><pre class="notranslate"><code class="notranslate">out.var = out.qk / (k-1.0);
</code></pre></div>
<p dir="auto">results in proper compilation. Also, removing the previous scope of the for loop works and the compiler then properly complains about the (k-1) bit. Below is the backtrace:</p>
<p dir="auto">----- BACKTRACE ----</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: Impl DefId { krate: 2, node: 39365 } was matchable against Obligation(predicate=Binder(TraitPredicate(core::ops::Sub&lt;_&gt;)),depth=1) but now is not
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-mac/build/src/libsyntax/diagnostic.rs:190

stack backtrace:
   1:        0x107943f77 - sys::backtrace::write::h799ab135045ca9ca1LC
   2:        0x107971e4d - panicking::on_panic::h9502e488a92fc8bcHAI
   3:        0x1078962de - rt::unwind::begin_unwind_inner::hf0537788ee16eadbiiI
   4:        0x1070755ae - rt::unwind::begin_unwind::h447731439410619827
   5:        0x107075df9 - diagnostic::Handler::bug::hb6bac6e14e70580aZsB
   6:        0x104b9c3be - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::rematch_impl::h00902254f92fe252QxT
   7:        0x104b9bd08 - middle::infer::InferCtxt&lt;'a, 'tcx&gt;::commit_if_ok::h14474907185931287891
   8:        0x104b7ce94 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::confirm_candidate::h3f1d070f70ab815cMPS
   9:        0x104b509c6 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::select::hc528f249f6251cb8OQQ
  10:        0x104b6098a - middle::traits::project::project_type::h7ca468ea33bc79f1AwP
  11:        0x104b5e367 - middle::traits::project::opt_normalize_projection_type::h766518f8b1310230cpP
  12:        0x104b57d86 - middle::traits::project::poly_project_and_unify_type::closure.83535
  13:        0x104b55bc0 - middle::traits::project::poly_project_and_unify_type::h44012951a95c13e5l5O
  14:        0x104b4d206 - middle::traits::fulfill::FulfillmentContext&lt;'tcx&gt;::select::h7d8cf023413c2180uHO
  15:        0x104b4c848 - middle::traits::fulfill::FulfillmentContext&lt;'tcx&gt;::select_where_possible::h0397a49aa695a23cIGO
  16:        0x103efa433 - check::vtable::select_fcx_obligations_where_possible::h99330aa4e9f6a658d4b
  17:        0x103f3448d - check::FnCtxt&lt;'a, 'tcx&gt;::resolve_type_vars_if_possible::h7c8e59ec20a8f3b2qYo
  18:        0x103fb0a3e - check::op::check_binop::h7e7f29a781258fb2u5m
  19:        0x10400878d - check::check_expr_with_unifier::h13696137427352880546
  20:        0x103ff552c - check::check_expr_with_unifier::h7970691808293538245
  21:        0x103fb0a33 - check::op::check_binop::h7e7f29a781258fb2u5m
  22:        0x103ff43c3 - check::check_expr_with_unifier::h7970691808293538245
  23:        0x10400fab9 - check::check_expr_with_unifier::h6698900367440735538
  24:        0x103fbe705 - check::check_block_with_expected::h60bff5b1f9d55793fps
  25:        0x103f9ae05 - check::check_fn::h410d0ffafb47f675l1n
  26:        0x103fb932e - check::check_bare_fn::h05c77be534ada2cfUQn
  27:        0x103fb2ee2 - check::check_item::h9d89bedf29e4fe82F9n
  28:        0x10408f676 - check_crate::closure.36302
  29:        0x104089ae7 - check_crate::h09aa7856a322fd44bwC
  30:        0x103da9355 - driver::phase_3_run_analysis_passes::h1af60e7c926ca39dgGa
  31:        0x103d8da85 - driver::compile_input::h27cf4320fd56e5cbQba
  32:        0x103e4ba15 - run_compiler::h93c68a2a3c26052bV4b
  33:        0x103e491e2 - boxed::F.FnBox&lt;A&gt;::call_box::h4498816167135712709
  34:        0x103e486d7 - rt::unwind::try::try_fn::h2387014819904265058
  35:        0x1079fbea8 - rust_try_inner
  36:        0x1079fbe95 - rust_try
  37:        0x103e489ca - boxed::F.FnBox&lt;A&gt;::call_box::h4850138824497903476
  38:        0x10795b37d - sys::thread::create::thread_start::h42d6d904fce5365aihH
  39:     0x7fff82bc6267 - _pthread_body
  40:     0x7fff82bc61e4 - _pthread_start"><pre class="notranslate"><code class="notranslate">error: internal compiler error: Impl DefId { krate: 2, node: 39365 } was matchable against Obligation(predicate=Binder(TraitPredicate(core::ops::Sub&lt;_&gt;)),depth=1) but now is not
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-mac/build/src/libsyntax/diagnostic.rs:190

stack backtrace:
   1:        0x107943f77 - sys::backtrace::write::h799ab135045ca9ca1LC
   2:        0x107971e4d - panicking::on_panic::h9502e488a92fc8bcHAI
   3:        0x1078962de - rt::unwind::begin_unwind_inner::hf0537788ee16eadbiiI
   4:        0x1070755ae - rt::unwind::begin_unwind::h447731439410619827
   5:        0x107075df9 - diagnostic::Handler::bug::hb6bac6e14e70580aZsB
   6:        0x104b9c3be - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::rematch_impl::h00902254f92fe252QxT
   7:        0x104b9bd08 - middle::infer::InferCtxt&lt;'a, 'tcx&gt;::commit_if_ok::h14474907185931287891
   8:        0x104b7ce94 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::confirm_candidate::h3f1d070f70ab815cMPS
   9:        0x104b509c6 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::select::hc528f249f6251cb8OQQ
  10:        0x104b6098a - middle::traits::project::project_type::h7ca468ea33bc79f1AwP
  11:        0x104b5e367 - middle::traits::project::opt_normalize_projection_type::h766518f8b1310230cpP
  12:        0x104b57d86 - middle::traits::project::poly_project_and_unify_type::closure.83535
  13:        0x104b55bc0 - middle::traits::project::poly_project_and_unify_type::h44012951a95c13e5l5O
  14:        0x104b4d206 - middle::traits::fulfill::FulfillmentContext&lt;'tcx&gt;::select::h7d8cf023413c2180uHO
  15:        0x104b4c848 - middle::traits::fulfill::FulfillmentContext&lt;'tcx&gt;::select_where_possible::h0397a49aa695a23cIGO
  16:        0x103efa433 - check::vtable::select_fcx_obligations_where_possible::h99330aa4e9f6a658d4b
  17:        0x103f3448d - check::FnCtxt&lt;'a, 'tcx&gt;::resolve_type_vars_if_possible::h7c8e59ec20a8f3b2qYo
  18:        0x103fb0a3e - check::op::check_binop::h7e7f29a781258fb2u5m
  19:        0x10400878d - check::check_expr_with_unifier::h13696137427352880546
  20:        0x103ff552c - check::check_expr_with_unifier::h7970691808293538245
  21:        0x103fb0a33 - check::op::check_binop::h7e7f29a781258fb2u5m
  22:        0x103ff43c3 - check::check_expr_with_unifier::h7970691808293538245
  23:        0x10400fab9 - check::check_expr_with_unifier::h6698900367440735538
  24:        0x103fbe705 - check::check_block_with_expected::h60bff5b1f9d55793fps
  25:        0x103f9ae05 - check::check_fn::h410d0ffafb47f675l1n
  26:        0x103fb932e - check::check_bare_fn::h05c77be534ada2cfUQn
  27:        0x103fb2ee2 - check::check_item::h9d89bedf29e4fe82F9n
  28:        0x10408f676 - check_crate::closure.36302
  29:        0x104089ae7 - check_crate::h09aa7856a322fd44bwC
  30:        0x103da9355 - driver::phase_3_run_analysis_passes::h1af60e7c926ca39dgGa
  31:        0x103d8da85 - driver::compile_input::h27cf4320fd56e5cbQba
  32:        0x103e4ba15 - run_compiler::h93c68a2a3c26052bV4b
  33:        0x103e491e2 - boxed::F.FnBox&lt;A&gt;::call_box::h4498816167135712709
  34:        0x103e486d7 - rt::unwind::try::try_fn::h2387014819904265058
  35:        0x1079fbea8 - rust_try_inner
  36:        0x1079fbe95 - rust_try
  37:        0x103e489ca - boxed::F.FnBox&lt;A&gt;::call_box::h4850138824497903476
  38:        0x10795b37d - sys::thread::create::thread_start::h42d6d904fce5365aihH
  39:     0x7fff82bc6267 - _pthread_body
  40:     0x7fff82bc61e4 - _pthread_start
</code></pre></div>