<p dir="auto">sample session:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rusti
WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead.
rusti&gt; fn f() {}
()
rusti&gt; fn f() {}
()
rusti&gt; 42;
&lt;anon&gt;:35:0: 35:10 error: duplicate definition of value f
&lt;anon&gt;:35 fn f() { }
          ^~~~~~~~~~
&lt;anon&gt;:33:0: 33:10 note: first definition of value f here:
&lt;anon&gt;:33 fn f() { }
          ^~~~~~~~~~
error: aborting due to previous error
rust: task failed at 'explicit failure', /home/ben/code/repos/rust/src/libsyntax/diagnostic.rs:99"><pre class="notranslate"><code class="notranslate">$ rusti
WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead.
rusti&gt; fn f() {}
()
rusti&gt; fn f() {}
()
rusti&gt; 42;
&lt;anon&gt;:35:0: 35:10 error: duplicate definition of value f
&lt;anon&gt;:35 fn f() { }
          ^~~~~~~~~~
&lt;anon&gt;:33:0: 33:10 note: first definition of value f here:
&lt;anon&gt;:33 fn f() { }
          ^~~~~~~~~~
error: aborting due to previous error
rust: task failed at 'explicit failure', /home/ben/code/repos/rust/src/libsyntax/diagnostic.rs:99
</code></pre></div>
<p dir="auto">See comment below: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="31892594" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/13655" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/13655/hovercard?comment_id=46382595&amp;comment_type=issue_comment" href="https://github.com/rust-lang/rust/issues/13655#issuecomment-46382595">#13655 (comment)</a>.</p>
<hr>
<p dir="auto"><strong>old report</strong></p>
<p dir="auto">I tried running it in the debugger, but couldn't get gdb to find "rust_fail" for a breakpoint.  I also didn't check whether this is a duplicate, sorry.</p>
<p dir="auto">$ rustc -v<br>
rustc 0.11-pre-nightly (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/e33228727e97e3abb95ca91f6b6049f8682db7d0/hovercard" href="https://github.com/rust-lang/rust/commit/e33228727e97e3abb95ca91f6b6049f8682db7d0"><tt>e332287</tt></a> 2014-04-16 00:56:30 -0700)<br>
host: x86_64-unknown-linux-gnu</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc server.rs
schooner/log.rs:202:13: 202:23 error: mismatched types: expected `std::result::Result&lt;~str,std::io::IoError&gt;` but found `std::option::Option&lt;&lt;generic #264&gt;&gt;` (expected enum std::result::Result but found enum std::option::Option)
schooner/log.rs:202             Some(line) =&gt; {
                                ^~~~~~~~~~
schooner/log.rs:210:13: 210:17 error: mismatched types: expected `std::result::Result&lt;~str,std::io::IoError&gt;` but found `std::option::Option&lt;&lt;generic #265&gt;&gt;` (expected enum std::result::Result but found enum std::option::Option)
schooner/log.rs:210             None =&gt; () // return Err(format!(&quot;Problem while reading in log file: {}&quot;, path.display().to_str()))
                                ^~~~
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'index out of bounds: the len is 0 but the index is 0', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/librustc/lib.rs:1
stack backtrace:
   1:     0x2ae4d244bf10 - rt::backtrace::imp::write::hb4d14c641715212670a::v0.11.pre
   2:     0x2ae4d23ad460 - rt::unwind::begin_unwind_inner::hb6257486a54a301cABa::v0.11.pre
   3:     0x2ae4d23ad3d0 - rt::unwind::begin_unwind::h10a9dcad1e815882aBa::v0.11.pre
   4:     0x2ae4d244bb20 - rt::unwind::begin_unwind_raw::h18b61474055627a8Jya::v0.11.pre
   5:     0x2ae4d23ac700 - rt::unwind::fail_::hc606fb5e7f153625nwa::v0.11.pre
   6:     0x2ae4d244bb90 - rt::unwind::fail_bounds_check::closure.40261
   7:     0x2ae4d23ae630 - rt::unwind::fail_bounds_check::hc426cbe6f6d8fda9Kwa::v0.11.pre
   8:     0x2ae4d0082160 - middle::typeck::check::method::LookupContext$LT$$x27a$GT$::push_bound_candidates::closure.66419
   9:     0x2ae4d0081060 - middle::typeck::check::autoderef::h3b3cd92df88ba880fO8::v0.11.pre
  10:     0x2ae4d007dda0 - middle::typeck::check::method::LookupContext$LT$$x27a$GT$::push_bound_candidates::hc19431f1eb875546Sy5::v0.11.pre
  11:     0x2ae4d007df30 - middle::typeck::check::method::lookup_in_trait::h66356e4f09bb4e3dGh5::v0.11.pre
  12:     0x2ae4d007e930 - middle::typeck::check::try_overloaded_deref::h6c4b3c92b2204307bS8::v0.11.pre
  13:     0x2ae4d0081060 - middle::typeck::check::autoderef::h3b3cd92df88ba880fO8::v0.11.pre
  14:     0x2ae4d007c360 - middle::typeck::check::method::lookup::h2bab3026e2c612cbKa5::v0.11.pre
  15:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  16:     0x2ae4d00bed70 - middle::typeck::check::check_expr_with_unifier::check_argument_types::hdf195254fb9ad91aqq9::v0.11.pre
  17:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  18:     0x2ae4d001ec70 - middle::typeck::check::_match::check_match::h27f8e9c536cc6bd3dzZ::v0.11.pre
  19:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  20:     0x2ae4d00978e0 - middle::typeck::check::check_block_with_expected::h3838f44d28bed00bJGb::v0.11.pre
  21:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  22:     0x2ae4d001ec70 - middle::typeck::check::_match::check_match::h27f8e9c536cc6bd3dzZ::v0.11.pre
  23:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  24:     0x2ae4d00978e0 - middle::typeck::check::check_block_with_expected::h3838f44d28bed00bJGb::v0.11.pre
  25:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  26:     0x2ae4d001ec70 - middle::typeck::check::_match::check_match::h27f8e9c536cc6bd3dzZ::v0.11.pre
  27:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  28:     0x2ae4d00978e0 - middle::typeck::check::check_block_with_expected::h3838f44d28bed00bJGb::v0.11.pre
  29:     0x2ae4d00c03a0 - middle::typeck::check::check_block_no_value::hd954ad05ca60716aFFb::v0.11.pre
  30:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  31:     0x2ae4d001ec70 - middle::typeck::check::_match::check_match::h27f8e9c536cc6bd3dzZ::v0.11.pre
  32:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  33:     0x2ae4d00978e0 - middle::typeck::check::check_block_with_expected::h3838f44d28bed00bJGb::v0.11.pre
  34:     0x2ae4d0093020 - middle::typeck::check::check_fn::h9d9a07999182adc5Zp7::v0.11.pre
  35:     0x2ae4d0092dc0 - middle::typeck::check::check_bare_fn::hb6bc5891dd566922Rf7::v0.11.pre
  36:     0x2ae4d008e130 - middle::typeck::check::check_item::hb61a6cf0c634001eZx7::v0.11.pre
  37:     0x2ae4d008fbb0 - visit::walk_item::h820b10196031a87d1xw::v0.11.pre
  38:     0x2ae4d008fbb0 - visit::walk_item::h820b10196031a87d1xw::v0.11.pre
  39:     0x2ae4d0092ca0 - middle::typeck::check::check_item_types::h81b2805d49e06382rf7::v0.11.pre
  40:     0x2ae4d01d32c0 - util::common::time::h104026deb384af9cxFg::v0.11.pre
  41:     0x2ae4d01d1c90 - middle::typeck::check_crate::hff5b61383c42166fV7t::v0.11.pre
  42:     0x2ae4d06063f0 - driver::driver::phase_3_run_analysis_passes::h268420b55d9aba34Xre::v0.11.pre
  43:     0x2ae4d060ce00 - driver::driver::compile_input::h3ccf917b299cf56eSQe::v0.11.pre
  44:     0x2ae4d06311e0 - run_compiler::he183fbc68c036254gpm::v0.11.pre
  45:     0x2ae4d06488e0 - main_args::closure.91933
  46:     0x2ae4d0647210 - monitor::closure.91818
  47:     0x2ae4d0642af0 - task::TaskBuilder::try::closure.91584
  48:     0x2ae4cf8c5fa0 - task::spawn_opts::closure.7973
  49:     0x2ae4d2446f40 - rt::task::Task::run::closure.40163
  50:     0x2ae4d2452aa0 - rust_try
  51:     0x2ae4d2446d80 - rt::task::Task::run::hf191250bb000025bBr8::v0.11.pre
  52:     0x2ae4cf8c5d70 - task::spawn_opts::closure.7946
  53:     0x2ae4d244aa50 - rt::thread::thread_start::h7631e63c8ba8fa17g68::v0.11.pre
  54:     0x2ae4d2e76ea0 - start_thread
  55:     0x2ae4d2ba1999 - __clone
  56:                0x0 - &lt;unknown&gt;"><pre class="notranslate"><code class="notranslate">rustc server.rs
schooner/log.rs:202:13: 202:23 error: mismatched types: expected `std::result::Result&lt;~str,std::io::IoError&gt;` but found `std::option::Option&lt;&lt;generic #264&gt;&gt;` (expected enum std::result::Result but found enum std::option::Option)
schooner/log.rs:202             Some(line) =&gt; {
                                ^~~~~~~~~~
schooner/log.rs:210:13: 210:17 error: mismatched types: expected `std::result::Result&lt;~str,std::io::IoError&gt;` but found `std::option::Option&lt;&lt;generic #265&gt;&gt;` (expected enum std::result::Result but found enum std::option::Option)
schooner/log.rs:210             None =&gt; () // return Err(format!("Problem while reading in log file: {}", path.display().to_str()))
                                ^~~~
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'index out of bounds: the len is 0 but the index is 0', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/librustc/lib.rs:1
stack backtrace:
   1:     0x2ae4d244bf10 - rt::backtrace::imp::write::hb4d14c641715212670a::v0.11.pre
   2:     0x2ae4d23ad460 - rt::unwind::begin_unwind_inner::hb6257486a54a301cABa::v0.11.pre
   3:     0x2ae4d23ad3d0 - rt::unwind::begin_unwind::h10a9dcad1e815882aBa::v0.11.pre
   4:     0x2ae4d244bb20 - rt::unwind::begin_unwind_raw::h18b61474055627a8Jya::v0.11.pre
   5:     0x2ae4d23ac700 - rt::unwind::fail_::hc606fb5e7f153625nwa::v0.11.pre
   6:     0x2ae4d244bb90 - rt::unwind::fail_bounds_check::closure.40261
   7:     0x2ae4d23ae630 - rt::unwind::fail_bounds_check::hc426cbe6f6d8fda9Kwa::v0.11.pre
   8:     0x2ae4d0082160 - middle::typeck::check::method::LookupContext$LT$$x27a$GT$::push_bound_candidates::closure.66419
   9:     0x2ae4d0081060 - middle::typeck::check::autoderef::h3b3cd92df88ba880fO8::v0.11.pre
  10:     0x2ae4d007dda0 - middle::typeck::check::method::LookupContext$LT$$x27a$GT$::push_bound_candidates::hc19431f1eb875546Sy5::v0.11.pre
  11:     0x2ae4d007df30 - middle::typeck::check::method::lookup_in_trait::h66356e4f09bb4e3dGh5::v0.11.pre
  12:     0x2ae4d007e930 - middle::typeck::check::try_overloaded_deref::h6c4b3c92b2204307bS8::v0.11.pre
  13:     0x2ae4d0081060 - middle::typeck::check::autoderef::h3b3cd92df88ba880fO8::v0.11.pre
  14:     0x2ae4d007c360 - middle::typeck::check::method::lookup::h2bab3026e2c612cbKa5::v0.11.pre
  15:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  16:     0x2ae4d00bed70 - middle::typeck::check::check_expr_with_unifier::check_argument_types::hdf195254fb9ad91aqq9::v0.11.pre
  17:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  18:     0x2ae4d001ec70 - middle::typeck::check::_match::check_match::h27f8e9c536cc6bd3dzZ::v0.11.pre
  19:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  20:     0x2ae4d00978e0 - middle::typeck::check::check_block_with_expected::h3838f44d28bed00bJGb::v0.11.pre
  21:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  22:     0x2ae4d001ec70 - middle::typeck::check::_match::check_match::h27f8e9c536cc6bd3dzZ::v0.11.pre
  23:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  24:     0x2ae4d00978e0 - middle::typeck::check::check_block_with_expected::h3838f44d28bed00bJGb::v0.11.pre
  25:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  26:     0x2ae4d001ec70 - middle::typeck::check::_match::check_match::h27f8e9c536cc6bd3dzZ::v0.11.pre
  27:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  28:     0x2ae4d00978e0 - middle::typeck::check::check_block_with_expected::h3838f44d28bed00bJGb::v0.11.pre
  29:     0x2ae4d00c03a0 - middle::typeck::check::check_block_no_value::hd954ad05ca60716aFFb::v0.11.pre
  30:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  31:     0x2ae4d001ec70 - middle::typeck::check::_match::check_match::h27f8e9c536cc6bd3dzZ::v0.11.pre
  32:     0x2ae4d00b4fe0 - middle::typeck::check::check_expr_with_unifier::he8b805180753f0ebom9::v0.11.pre
  33:     0x2ae4d00978e0 - middle::typeck::check::check_block_with_expected::h3838f44d28bed00bJGb::v0.11.pre
  34:     0x2ae4d0093020 - middle::typeck::check::check_fn::h9d9a07999182adc5Zp7::v0.11.pre
  35:     0x2ae4d0092dc0 - middle::typeck::check::check_bare_fn::hb6bc5891dd566922Rf7::v0.11.pre
  36:     0x2ae4d008e130 - middle::typeck::check::check_item::hb61a6cf0c634001eZx7::v0.11.pre
  37:     0x2ae4d008fbb0 - visit::walk_item::h820b10196031a87d1xw::v0.11.pre
  38:     0x2ae4d008fbb0 - visit::walk_item::h820b10196031a87d1xw::v0.11.pre
  39:     0x2ae4d0092ca0 - middle::typeck::check::check_item_types::h81b2805d49e06382rf7::v0.11.pre
  40:     0x2ae4d01d32c0 - util::common::time::h104026deb384af9cxFg::v0.11.pre
  41:     0x2ae4d01d1c90 - middle::typeck::check_crate::hff5b61383c42166fV7t::v0.11.pre
  42:     0x2ae4d06063f0 - driver::driver::phase_3_run_analysis_passes::h268420b55d9aba34Xre::v0.11.pre
  43:     0x2ae4d060ce00 - driver::driver::compile_input::h3ccf917b299cf56eSQe::v0.11.pre
  44:     0x2ae4d06311e0 - run_compiler::he183fbc68c036254gpm::v0.11.pre
  45:     0x2ae4d06488e0 - main_args::closure.91933
  46:     0x2ae4d0647210 - monitor::closure.91818
  47:     0x2ae4d0642af0 - task::TaskBuilder::try::closure.91584
  48:     0x2ae4cf8c5fa0 - task::spawn_opts::closure.7973
  49:     0x2ae4d2446f40 - rt::task::Task::run::closure.40163
  50:     0x2ae4d2452aa0 - rust_try
  51:     0x2ae4d2446d80 - rt::task::Task::run::hf191250bb000025bBr8::v0.11.pre
  52:     0x2ae4cf8c5d70 - task::spawn_opts::closure.7946
  53:     0x2ae4d244aa50 - rt::thread::thread_start::h7631e63c8ba8fa17g68::v0.11.pre
  54:     0x2ae4d2e76ea0 - start_thread
  55:     0x2ae4d2ba1999 - __clone
  56:                0x0 - &lt;unknown&gt;
</code></pre></div>