<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(unboxed_closures)]
use std::ops::Fn;
fn say(x: u32, y: u32) {
    println!(&quot;{} {}&quot;, x, y);
}
fn main() {
    Fn::call(&amp;say, (1, 2));
}"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>unboxed_closures<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">use</span> std<span class="pl-kos">::</span>ops<span class="pl-kos">::</span><span class="pl-v">Fn</span><span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">say</span><span class="pl-kos">(</span><span class="pl-s1">x</span><span class="pl-kos">:</span> <span class="pl-smi">u32</span><span class="pl-kos">,</span> <span class="pl-s1">y</span><span class="pl-kos">:</span> <span class="pl-smi">u32</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">"{} {}"</span>, x, y<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">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-smi">Fn</span><span class="pl-kos">::</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span>say<span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">)</span><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="rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)
binary: rustc
commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7
commit-date: 2015-01-08 17:03:40 -0800
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly"><pre class="notranslate"><code class="notranslate">rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)
binary: rustc
commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7
commit-date: 2015-01-08 17:03:40 -0800
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ RUST_BACKTRACE=1 rustc main.rs
main.rs:7:5: 7:13 warning: use of unstable item: uncertain about variadic generics, input versus associated types, #[warn(unstable)] on by default
main.rs:7     Fn::call(&amp;say, (1, 2));
              ^~~~~~~~
error: internal compiler error: static call to invalid vtable: VtableFnPointer(fn(u32, u32) {say})
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
thread 'rustc' panicked at 'Box&lt;Any&gt;', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:182

stack backtrace:
   1:     0x7f28a8488850 - sys::backtrace::write::h5b05e7b061a35107Czt
   2:     0x7f28a84aaa60 - failure::on_fail::h1e9b7e3de59488d1aPz
   3:     0x7f28a84185e0 - rt::unwind::begin_unwind_inner::h23dcfb4c37870bd62tz
   4:     0x7f28a3230460 - rt::unwind::begin_unwind::h8180555736548804672
   5:     0x7f28a3230d10 - diagnostic::Handler::bug::hfea99a1512d774b6tWF
   6:     0x7f28a67880d0 - session::Session::bug::hda4aef05452f83daiRq
   7:     0x7f28a748d1f0 - trans::meth::trans_static_method_callee::h7b45cabbb9a118b8sbz
   8:     0x7f28a748a0d0 - trans::callee::trans::h36851c362b65c790yag
   9:     0x7f28a74942f0 - trans::callee::trans_call_inner::h8685402877239769531
  10:     0x7f28a7499d10 - trans::expr::trans_rvalue_dps_unadjusted::hadddfbae4195cb641Si
  11:     0x7f28a74505f0 - trans::expr::trans_into::ha60adcbe08fa3bdbKyh
  12:     0x7f28a744f9b0 - trans::controlflow::trans_stmt_semi::hce06ed398066bc74K2d
  13:     0x7f28a7450c40 - trans::controlflow::trans_block::hdd6a1a94b7524b90B3d
  14:     0x7f28a751cc70 - trans::base::trans_closure::h1947fd5123bfe895EYt
  15:     0x7f28a743bb10 - trans::base::trans_fn::h5d061f11fc4ac1e7j9t
  16:     0x7f28a74370a0 - trans::base::trans_item::h34ec82732f0498f3Ewu
  17:     0x7f28a7524490 - trans::base::trans_crate::he5ffa45aaa619f67lsv
  18:     0x7f28a89e63c0 - driver::phase_4_translate_to_llvm::h98aea3c7bb04643bPFa
  19:     0x7f28a89c0350 - driver::compile_input::h04aea004c559b910xba
  20:     0x7f28a8a8ffe0 - monitor::unboxed_closure.22497
  21:     0x7f28a8a8fe40 - thunk::F.Invoke&lt;A, R&gt;::invoke::h11849311349984608396
  22:     0x7f28a8a8ebc0 - rt::unwind::try::try_fn::h13617610205470131813
  23:     0x7f28a85106c0 - rust_try_inner
  24:     0x7f28a85106b0 - rust_try
  25:     0x7f28a8a8eeb0 - thunk::F.Invoke&lt;A, R&gt;::invoke::h14452289732390470265
  26:     0x7f28a8498910 - sys::thread::thread_start::h93b0d38960a9fcacqrw
  27:     0x7f28a2a4e250 - start_thread
  28:     0x7f28a80ce219 - clone
  29:                0x0 - &lt;unknown&gt;"><pre class="notranslate"><code class="notranslate">$ RUST_BACKTRACE=1 rustc main.rs
main.rs:7:5: 7:13 warning: use of unstable item: uncertain about variadic generics, input versus associated types, #[warn(unstable)] on by default
main.rs:7     Fn::call(&amp;say, (1, 2));
              ^~~~~~~~
error: internal compiler error: static call to invalid vtable: VtableFnPointer(fn(u32, u32) {say})
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
thread 'rustc' panicked at 'Box&lt;Any&gt;', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:182

stack backtrace:
   1:     0x7f28a8488850 - sys::backtrace::write::h5b05e7b061a35107Czt
   2:     0x7f28a84aaa60 - failure::on_fail::h1e9b7e3de59488d1aPz
   3:     0x7f28a84185e0 - rt::unwind::begin_unwind_inner::h23dcfb4c37870bd62tz
   4:     0x7f28a3230460 - rt::unwind::begin_unwind::h8180555736548804672
   5:     0x7f28a3230d10 - diagnostic::Handler::bug::hfea99a1512d774b6tWF
   6:     0x7f28a67880d0 - session::Session::bug::hda4aef05452f83daiRq
   7:     0x7f28a748d1f0 - trans::meth::trans_static_method_callee::h7b45cabbb9a118b8sbz
   8:     0x7f28a748a0d0 - trans::callee::trans::h36851c362b65c790yag
   9:     0x7f28a74942f0 - trans::callee::trans_call_inner::h8685402877239769531
  10:     0x7f28a7499d10 - trans::expr::trans_rvalue_dps_unadjusted::hadddfbae4195cb641Si
  11:     0x7f28a74505f0 - trans::expr::trans_into::ha60adcbe08fa3bdbKyh
  12:     0x7f28a744f9b0 - trans::controlflow::trans_stmt_semi::hce06ed398066bc74K2d
  13:     0x7f28a7450c40 - trans::controlflow::trans_block::hdd6a1a94b7524b90B3d
  14:     0x7f28a751cc70 - trans::base::trans_closure::h1947fd5123bfe895EYt
  15:     0x7f28a743bb10 - trans::base::trans_fn::h5d061f11fc4ac1e7j9t
  16:     0x7f28a74370a0 - trans::base::trans_item::h34ec82732f0498f3Ewu
  17:     0x7f28a7524490 - trans::base::trans_crate::he5ffa45aaa619f67lsv
  18:     0x7f28a89e63c0 - driver::phase_4_translate_to_llvm::h98aea3c7bb04643bPFa
  19:     0x7f28a89c0350 - driver::compile_input::h04aea004c559b910xba
  20:     0x7f28a8a8ffe0 - monitor::unboxed_closure.22497
  21:     0x7f28a8a8fe40 - thunk::F.Invoke&lt;A, R&gt;::invoke::h11849311349984608396
  22:     0x7f28a8a8ebc0 - rt::unwind::try::try_fn::h13617610205470131813
  23:     0x7f28a85106c0 - rust_try_inner
  24:     0x7f28a85106b0 - rust_try
  25:     0x7f28a8a8eeb0 - thunk::F.Invoke&lt;A, R&gt;::invoke::h14452289732390470265
  26:     0x7f28a8498910 - sys::thread::thread_start::h93b0d38960a9fcacqrw
  27:     0x7f28a2a4e250 - start_thread
  28:     0x7f28a80ce219 - clone
  29:                0x0 - &lt;unknown&gt;
</code></pre></div>
<p dir="auto">Discovered this ICE in the rollup that I'm preparing:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
    let a: &amp;fmt::Show = &amp;1i;     
    format!(&quot;{:?}&quot;, a);
}"><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">&amp;</span>fmt<span class="pl-kos">::</span><span class="pl-smi">Show</span> = <span class="pl-c1">&amp;</span><span class="pl-c1">1</span>i<span class="pl-kos">;</span>     
    <span class="pl-en">format</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{:?}"</span>, a<span class="pl-kos">)</span><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="error: internal compiler error: static call to invalid vtable: VtableObject(VtableObject(object_ty=core::fmt::Show + 'static))
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
thread 'rustc' panicked at 'Box&lt;Any&gt;', /home/alex/code/rust2/src/libsyntax/diagnostic.rs:182"><pre class="notranslate"><code class="notranslate">error: internal compiler error: static call to invalid vtable: VtableObject(VtableObject(object_ty=core::fmt::Show + 'static))
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
thread 'rustc' panicked at 'Box&lt;Any&gt;', /home/alex/code/rust2/src/libsyntax/diagnostic.rs:182
</code></pre></div>