<p dir="auto">Trying to include rust-http as a dependency results in an internal error, running <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/946654a721d6fd5eeb91e93293cdc2cba83c78b9/hovercard" href="https://github.com/rust-lang/rust/commit/946654a721d6fd5eeb91e93293cdc2cba83c78b9"><tt>946654a</tt></a>.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ RUST_BACKTRACE=1 cargo build --verbose
       Fresh openssl v0.0.0 (https://github.com/sfackler/rust-openssl.git#cec41181)
       Fresh encoding v0.1.0 (https://github.com/lifthrasiir/rust-encoding#35f0d70f)
       Fresh url v0.1.0 (https://github.com/servo/rust-url#bfdf8093)
   Compiling http v0.1.0-pre (https://github.com/chris-morgan/rust-http.git#b94454e4)
     Running sh prebuild.sh
Failed to run custom build command for `http v0.1.0-pre (https://github.com/chris-morgan/rust-http.git#b94454e4)`
Process didn't exit successfully: `sh prebuild.sh` (status=127)
--- stdout
   Compiling rust-http-codegen v0.1.0-pre (file:///Users/sebnow/.cargo/git/checkouts/rust-http-5674b483f218b212/master/codegen)
task 'rustc' failed at 'Box&lt;Any&gt;', /Users/sebnow/Documents/rust/src/libsyntax/ast_util.rs:694

stack backtrace:
   1:        0x10573ca69 - rt::backtrace::imp::write::haee36c9674313392dPq
   2:        0x10573fdc1 - failure::on_fail::h18ca178b57e3c599R5q
   3:        0x1059ca755 - unwind::begin_unwind_inner::hdf91233a12531aa5PQd
   4:        0x103778c47 - unwind::begin_unwind::h14665316014492492854
   5:        0x103779483 - diagnostic::Handler::bug::h28f0ca2456db3f42XND
   6:        0x102410088 - driver::session::Session::bug::h5b8344456481dee0fyx
   7:        0x1027e1fe6 - middle::trans::type_of::sizing_type_of::h9261548c35428499NP9
   8:        0x1028106ef - middle::trans::meth::get_vtable::hed28957b036ba05dkOk
   9:        0x10280fbe7 - middle::trans::expr::apply_adjustments::unsized_info::hda35613e1cab4ff9Gl3
  10:        0x102812986 - middle::trans::expr::apply_adjustments::unsize_expr::closure.124116
  11:        0x102812b2f - middle::trans::expr::apply_adjustments::into_fat_ptr::h8fbe0bfc985c300aZs3
  12:        0x10280f292 - middle::trans::expr::apply_adjustments::apply_autoref::h252f3103c9877037D82
  13:        0x10280eb4c - middle::trans::expr::apply_adjustments::apply_autoref::h252f3103c9877037D82
  14:        0x1027cff1c - middle::trans::expr::trans::h66080e396e10a5cfRW2
  15:        0x1028047e7 - middle::trans::callee::trans_args::hd334afe2d52d20f04r2
  16:        0x1027d6ceb - middle::trans::callee::trans_call_inner::he7a3cf0efe973c74961
  17:        0x1027fdabd - middle::trans::callee::trans_call::haa6ae4f7aade5ec7u11
  18:        0x10280c915 - middle::trans::expr::trans_rvalue_dps_unadjusted::h1a1aa0a5f3241bf4Sc4
  19:        0x10280b19d - middle::trans::expr::trans_unadjusted::h77bab0db2ba06bf1LD3
  20:        0x1027cf318 - middle::trans::expr::trans::h66080e396e10a5cfRW2
  21:        0x10281eae5 - middle::trans::_match::trans_match::ha85240b9775cca14M9h
  22:        0x10280c31f - middle::trans::expr::trans_rvalue_dps_unadjusted::h1a1aa0a5f3241bf4Sc4
  23:        0x1027cdf31 - middle::trans::expr::trans_into::hd903990ca0512a327S2
  24:        0x1027cd29a - middle::trans::controlflow::trans_stmt_semi::hd96bdd42d4208757cZY
  25:        0x1027cca14 - middle::trans::controlflow::trans_stmt::hde52138b93fe22d19UY
  26:        0x1027ce188 - middle::trans::controlflow::trans_block::hc1a0a88cc6435a435ZY
  27:        0x10287d103 - middle::trans::base::trans_closure::h34c2d01620eba474r1e
  28:        0x1027c0cc8 - middle::trans::base::trans_fn::h2755db1dc190bd6fEcf
  29:        0x1027bdacd - middle::trans::base::trans_item::h618cb9036c98f056Nvf
  30:        0x1027bddf8 - middle::trans::base::trans_item::h618cb9036c98f056Nvf
  31:        0x102887318 - middle::trans::base::trans_crate::hdfc80fd2c7d6ee30Gtg
  32:        0x102c66fc5 - driver::driver::phase_4_translate_to_llvm::h723fe83079de59d87Yw
  33:        0x102c5f6ff - driver::driver::compile_input::h858300a6b2e42cb79ww
  34:        0x102cdea51 - driver::run_compiler::hba7b2e22eae5d051FnA
  35:        0x102cdcc86 - driver::main_args::closure.146239
  36:        0x10243e23b - task::TaskBuilder&lt;S&gt;::try_future::closure.101939
  37:        0x10243e133 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.101910
  38:        0x103e2594d - task::spawn_opts::closure.8511
  39:        0x105a2ff4c - rust_try_inner
  40:        0x105a2ff36 - rust_try
  41:        0x1059c7b07 - unwind::try::hd9207e38b158b31bxFd
  42:        0x1059c797c - task::Task::run::hb9448d2544b93aaaPVc
  43:        0x103e257a2 - task::spawn_opts::closure.8450
  44:        0x1059c963a - thread::thread_start::hb91288d4cab9ba651fd
  45:     0x7fff90671899 - _pthread_body
  46:     0x7fff9067172a - _pthread_struct_init


--- stderr
error: internal compiler error: trying to take the sizing type of std::io::Writer, an unsized type
note: the compiler hit an unexpected failure path. 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
Could not compile `rust-http-codegen`.

To learn more, run the command again with --verbose.
prebuild.sh: line 10: codegen/target/codegen: No such file or directory
prebuild.sh: line 11: codegen/target/codegen: No such file or directory"><pre class="notranslate"><code class="notranslate">$ RUST_BACKTRACE=1 cargo build --verbose
       Fresh openssl v0.0.0 (https://github.com/sfackler/rust-openssl.git#cec41181)
       Fresh encoding v0.1.0 (https://github.com/lifthrasiir/rust-encoding#35f0d70f)
       Fresh url v0.1.0 (https://github.com/servo/rust-url#bfdf8093)
   Compiling http v0.1.0-pre (https://github.com/chris-morgan/rust-http.git#b94454e4)
     Running sh prebuild.sh
Failed to run custom build command for `http v0.1.0-pre (https://github.com/chris-morgan/rust-http.git#b94454e4)`
Process didn't exit successfully: `sh prebuild.sh` (status=127)
--- stdout
   Compiling rust-http-codegen v0.1.0-pre (file:///Users/sebnow/.cargo/git/checkouts/rust-http-5674b483f218b212/master/codegen)
task 'rustc' failed at 'Box&lt;Any&gt;', /Users/sebnow/Documents/rust/src/libsyntax/ast_util.rs:694

stack backtrace:
   1:        0x10573ca69 - rt::backtrace::imp::write::haee36c9674313392dPq
   2:        0x10573fdc1 - failure::on_fail::h18ca178b57e3c599R5q
   3:        0x1059ca755 - unwind::begin_unwind_inner::hdf91233a12531aa5PQd
   4:        0x103778c47 - unwind::begin_unwind::h14665316014492492854
   5:        0x103779483 - diagnostic::Handler::bug::h28f0ca2456db3f42XND
   6:        0x102410088 - driver::session::Session::bug::h5b8344456481dee0fyx
   7:        0x1027e1fe6 - middle::trans::type_of::sizing_type_of::h9261548c35428499NP9
   8:        0x1028106ef - middle::trans::meth::get_vtable::hed28957b036ba05dkOk
   9:        0x10280fbe7 - middle::trans::expr::apply_adjustments::unsized_info::hda35613e1cab4ff9Gl3
  10:        0x102812986 - middle::trans::expr::apply_adjustments::unsize_expr::closure.124116
  11:        0x102812b2f - middle::trans::expr::apply_adjustments::into_fat_ptr::h8fbe0bfc985c300aZs3
  12:        0x10280f292 - middle::trans::expr::apply_adjustments::apply_autoref::h252f3103c9877037D82
  13:        0x10280eb4c - middle::trans::expr::apply_adjustments::apply_autoref::h252f3103c9877037D82
  14:        0x1027cff1c - middle::trans::expr::trans::h66080e396e10a5cfRW2
  15:        0x1028047e7 - middle::trans::callee::trans_args::hd334afe2d52d20f04r2
  16:        0x1027d6ceb - middle::trans::callee::trans_call_inner::he7a3cf0efe973c74961
  17:        0x1027fdabd - middle::trans::callee::trans_call::haa6ae4f7aade5ec7u11
  18:        0x10280c915 - middle::trans::expr::trans_rvalue_dps_unadjusted::h1a1aa0a5f3241bf4Sc4
  19:        0x10280b19d - middle::trans::expr::trans_unadjusted::h77bab0db2ba06bf1LD3
  20:        0x1027cf318 - middle::trans::expr::trans::h66080e396e10a5cfRW2
  21:        0x10281eae5 - middle::trans::_match::trans_match::ha85240b9775cca14M9h
  22:        0x10280c31f - middle::trans::expr::trans_rvalue_dps_unadjusted::h1a1aa0a5f3241bf4Sc4
  23:        0x1027cdf31 - middle::trans::expr::trans_into::hd903990ca0512a327S2
  24:        0x1027cd29a - middle::trans::controlflow::trans_stmt_semi::hd96bdd42d4208757cZY
  25:        0x1027cca14 - middle::trans::controlflow::trans_stmt::hde52138b93fe22d19UY
  26:        0x1027ce188 - middle::trans::controlflow::trans_block::hc1a0a88cc6435a435ZY
  27:        0x10287d103 - middle::trans::base::trans_closure::h34c2d01620eba474r1e
  28:        0x1027c0cc8 - middle::trans::base::trans_fn::h2755db1dc190bd6fEcf
  29:        0x1027bdacd - middle::trans::base::trans_item::h618cb9036c98f056Nvf
  30:        0x1027bddf8 - middle::trans::base::trans_item::h618cb9036c98f056Nvf
  31:        0x102887318 - middle::trans::base::trans_crate::hdfc80fd2c7d6ee30Gtg
  32:        0x102c66fc5 - driver::driver::phase_4_translate_to_llvm::h723fe83079de59d87Yw
  33:        0x102c5f6ff - driver::driver::compile_input::h858300a6b2e42cb79ww
  34:        0x102cdea51 - driver::run_compiler::hba7b2e22eae5d051FnA
  35:        0x102cdcc86 - driver::main_args::closure.146239
  36:        0x10243e23b - task::TaskBuilder&lt;S&gt;::try_future::closure.101939
  37:        0x10243e133 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.101910
  38:        0x103e2594d - task::spawn_opts::closure.8511
  39:        0x105a2ff4c - rust_try_inner
  40:        0x105a2ff36 - rust_try
  41:        0x1059c7b07 - unwind::try::hd9207e38b158b31bxFd
  42:        0x1059c797c - task::Task::run::hb9448d2544b93aaaPVc
  43:        0x103e257a2 - task::spawn_opts::closure.8450
  44:        0x1059c963a - thread::thread_start::hb91288d4cab9ba651fd
  45:     0x7fff90671899 - _pthread_body
  46:     0x7fff9067172a - _pthread_struct_init


--- stderr
error: internal compiler error: trying to take the sizing type of std::io::Writer, an unsized type
note: the compiler hit an unexpected failure path. 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
Could not compile `rust-http-codegen`.

To learn more, run the command again with --verbose.
prebuild.sh: line 10: codegen/target/codegen: No such file or directory
prebuild.sh: line 11: codegen/target/codegen: No such file or directory
</code></pre></div>
<p dir="auto">Complete newbie to Rust, so I have no idea where the actual error lies.</p>
<p dir="auto">OS: Mac OS 10.9.4<br>
Arch: x86_64</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use std::io;

fn f(wr: &amp;mut Writer) {
    wr.write_str(&quot;hello&quot;).ok().expect(&quot;failed&quot;);
}

fn main() {
    let mut wr = box io::stdout() as Box&lt;Writer + 'static&gt;;
    f(&amp;mut wr);
}"><pre class="notranslate"><span class="pl-k">use</span> std<span class="pl-kos">::</span>io<span class="pl-kos">;</span>

<span class="pl-k">fn</span> <span class="pl-en">f</span><span class="pl-kos">(</span><span class="pl-s1">wr</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-k">mut</span> <span class="pl-smi">Writer</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    wr<span class="pl-kos">.</span><span class="pl-en">write_str</span><span class="pl-kos">(</span><span class="pl-s">"hello"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">ok</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s">"failed"</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">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">let</span> <span class="pl-k">mut</span> wr = box io<span class="pl-kos">::</span><span class="pl-en">stdout</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-k">as</span> <span class="pl-smi">Box</span><span class="pl-kos">&lt;</span><span class="pl-smi">Writer</span> + <span class="pl-c1">'</span><span class="pl-ent">static</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span>
    <span class="pl-en">f</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-k">mut</span> wr<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 foo.rs  
error: internal compiler error: trying to take the sizing type of std::io::Writer, an unsized type  
note: the compiler hit an unexpected failure path. 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' failed at 'Box&lt;Any&gt;', /home/keegan/rust/src/libsyntax/diagnostic.rs:169  "><pre class="notranslate"><code class="notranslate">$ rustc foo.rs  
error: internal compiler error: trying to take the sizing type of std::io::Writer, an unsized type  
note: the compiler hit an unexpected failure path. 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' failed at 'Box&lt;Any&gt;', /home/keegan/rust/src/libsyntax/diagnostic.rs:169  
</code></pre></div>
<p dir="auto">upstream Rust version: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/828e075abd8ee2f8c16f6cb1b93c0d99307e704d/hovercard" href="https://github.com/rust-lang/rust/commit/828e075abd8ee2f8c16f6cb1b93c0d99307e704d"><tt>828e075</tt></a></p>