<p dir="auto">The offending code:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="trait A&lt;T: B&lt;Self&gt;&gt; {}
trait B&lt;T: A&lt;Self&gt;&gt; {}

pub fn main() {
}"><pre class="notranslate"><span class="pl-k">trait</span> <span class="pl-smi">A</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-smi">B</span><span class="pl-kos">&lt;</span><span class="pl-smi">Self</span><span class="pl-kos">&gt;</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-k">trait</span> <span class="pl-smi">B</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-smi">A</span><span class="pl-kos">&lt;</span><span class="pl-smi">Self</span><span class="pl-kos">&gt;</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>

<span class="pl-k">pub</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-kos">}</span></pre></div>
<p dir="auto">The gdb backtrace looks like the compiler recursing endlessly until it hits some stack size limit.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[omitting repetitions]
#17104 0x00007ffff616b4aa in middle::typeck::collect::trait_def_of_item::h61bb7c944e35871ca9::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17105 0x00007ffff615224a in middle::typeck::collect::get_trait_def::h87abf4c14526775as::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17106 0x00007ffff6156d50 in middle::typeck::astconv::ast_path_to_trait_ref::h49ff12f26c22e54fa0::v0.9$x2dpre ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17107 0x00007ffff6165276 in middle::typeck::collect::instantiate_trait_ref::had78f9fdcce09feaU::v0.9$x2dpre ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17108 0x00007ffff61738fd in middle::typeck::collect::ty_generics::compute_bounds::hcb86b3308d74d51baG::v0.9$x2dpre ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17109 0x00007ffff61607d3 in middle::typeck::collect::ty_generics::h264e3285aeb97c4caA::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17110 0x00007ffff616bb4a in middle::typeck::collect::mk_item_substs::h3b85d67131af11faG::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17111 0x00007ffff616b4aa in middle::typeck::collect::trait_def_of_item::h61bb7c944e35871ca9::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so

*** here is where the cycle begins ***

#17112 0x00007ffff614aeec in middle::typeck::collect::convert::hf12338bf4af8fd6aO::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17113 0x00007ffff6149aab in middle::typeck::collect::Visitor$CollectItemTypesVisitor::visit_item::hb81cd925e312c3c5UFaW::v0.9$x2dpre ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17114 0x00007ffff614f0ee in middle::typeck::collect::collect_item_types::ha47316e9329a9b19at::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17115 0x00007ffff618712c in util::common::time::hffc0442c9653491aao::v0.9$x2dpre ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17116 0x00007ffff6186c88 in middle::typeck::check_crate::h6e4aa652a1ea891aL::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17117 0x00007ffff642cd0a in driver::driver::phase_3_run_analysis_passes::h405af92a1617ff5ba5::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17118 0x00007ffff6430158 in driver::driver::compile_input::h6d55a4e9e4fea194ao::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17119 0x00007ffff6453583 in run_compiler::h47b2e3227fef69eeaR::v0.9$x2dpre ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17120 0x00007ffff6465c79 in main_args::anon::expr_fn::aw ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17121 0x00007ffff646429d in monitor::anon::expr_fn::aO ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17122 0x00007ffff6461bfe in task::TaskBuilder::try::anon::expr_fn::ova2a5 ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17123 0x00007ffff770c6e5 in task::spawn::spawn_raw::anon::expr_fn::am ()
   from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.9-pre.so
#17124 0x00007ffff775456e in rt::task::__extensions__::build_start_wrapper::anon::anon::expr_fn::aH () from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.9-pre.so
#17125 0x00007ffff7752e44 in rt::task::__extensions__::run::anon::expr_fn::aS ()
   from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.9-pre.so
#17126 0x00007ffff5a1cbe3 in rust_try () from /usr/local/bin/../lib/librustrt.so
#17127 0x00007ffff7752be3 in rt::task::Task::run::h199ab8d6eb226980fIaP::v0.9$x2dpre
    () from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.9-pre.so
#17128 0x00007ffff775423a in rt::task::__extensions__::build_start_wrapper::anon::expr_fn::ay () from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.9-pre.so
#17129 0x0000000000000000 in ?? ()
"><pre class="notranslate"><code class="notranslate">[omitting repetitions]
#17104 0x00007ffff616b4aa in middle::typeck::collect::trait_def_of_item::h61bb7c944e35871ca9::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17105 0x00007ffff615224a in middle::typeck::collect::get_trait_def::h87abf4c14526775as::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17106 0x00007ffff6156d50 in middle::typeck::astconv::ast_path_to_trait_ref::h49ff12f26c22e54fa0::v0.9$x2dpre ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17107 0x00007ffff6165276 in middle::typeck::collect::instantiate_trait_ref::had78f9fdcce09feaU::v0.9$x2dpre ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17108 0x00007ffff61738fd in middle::typeck::collect::ty_generics::compute_bounds::hcb86b3308d74d51baG::v0.9$x2dpre ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17109 0x00007ffff61607d3 in middle::typeck::collect::ty_generics::h264e3285aeb97c4caA::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17110 0x00007ffff616bb4a in middle::typeck::collect::mk_item_substs::h3b85d67131af11faG::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17111 0x00007ffff616b4aa in middle::typeck::collect::trait_def_of_item::h61bb7c944e35871ca9::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so

*** here is where the cycle begins ***

#17112 0x00007ffff614aeec in middle::typeck::collect::convert::hf12338bf4af8fd6aO::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17113 0x00007ffff6149aab in middle::typeck::collect::Visitor$CollectItemTypesVisitor::visit_item::hb81cd925e312c3c5UFaW::v0.9$x2dpre ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17114 0x00007ffff614f0ee in middle::typeck::collect::collect_item_types::ha47316e9329a9b19at::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17115 0x00007ffff618712c in util::common::time::hffc0442c9653491aao::v0.9$x2dpre ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17116 0x00007ffff6186c88 in middle::typeck::check_crate::h6e4aa652a1ea891aL::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17117 0x00007ffff642cd0a in driver::driver::phase_3_run_analysis_passes::h405af92a1617ff5ba5::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17118 0x00007ffff6430158 in driver::driver::compile_input::h6d55a4e9e4fea194ao::v0.9$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17119 0x00007ffff6453583 in run_compiler::h47b2e3227fef69eeaR::v0.9$x2dpre ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17120 0x00007ffff6465c79 in main_args::anon::expr_fn::aw ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17121 0x00007ffff646429d in monitor::anon::expr_fn::aO ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17122 0x00007ffff6461bfe in task::TaskBuilder::try::anon::expr_fn::ova2a5 ()
   from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.9-pre.so
#17123 0x00007ffff770c6e5 in task::spawn::spawn_raw::anon::expr_fn::am ()
   from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.9-pre.so
#17124 0x00007ffff775456e in rt::task::__extensions__::build_start_wrapper::anon::anon::expr_fn::aH () from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.9-pre.so
#17125 0x00007ffff7752e44 in rt::task::__extensions__::run::anon::expr_fn::aS ()
   from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.9-pre.so
#17126 0x00007ffff5a1cbe3 in rust_try () from /usr/local/bin/../lib/librustrt.so
#17127 0x00007ffff7752be3 in rt::task::Task::run::h199ab8d6eb226980fIaP::v0.9$x2dpre
    () from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.9-pre.so
#17128 0x00007ffff775423a in rt::task::__extensions__::build_start_wrapper::anon::expr_fn::ay () from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.9-pre.so
#17129 0x0000000000000000 in ?? ()

</code></pre></div>
<p dir="auto">The compiler was built from <code class="notranslate">0.8-416-gc147ec6</code></p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="trait A&lt;T: B&gt;{}
trait B&lt;T: A&gt; {}"><pre class="notranslate"><span class="pl-k">trait</span> <span class="pl-smi">A</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-smi">B</span><span class="pl-kos">&gt;</span><span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-k">trait</span> <span class="pl-smi">B</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-smi">A</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">boom.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Segmentation fault
application terminated with error code 139"><pre class="notranslate"><code class="notranslate">Segmentation fault
application terminated with error code 139
</code></pre></div>
<p dir="auto">Edit: HAH!</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="trait A&lt;T:A&gt; {}"><pre class="notranslate"><span class="pl-k">trait</span> <span class="pl-smi">A</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">:</span><span class="pl-smi">A</span><span class="pl-kos">&gt;</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="Segmentation fault
application terminated with error code 139"><pre class="notranslate"><code class="notranslate">Segmentation fault
application terminated with error code 139
</code></pre></div>