<p dir="auto">I got the compiler to panic. Here is the <strong>backtrace</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ RUST_BACKTRACE=1 cargo build
   Compiling mdbook v0.0.1 (file:///home/mathieu/Programming/Rust/mdbook)
error: internal compiler error: unexpected panic
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
thread 'rustc' panicked at 'fold_mac disabled by default', ../src/libsyntax/fold.rs:190

stack backtrace:
   1:     0x7f8f9d556c8e - sys::backtrace::write::hba0090c65dc9b973kqs
   2:     0x7f8f9d55eb34 - panicking::on_panic::ha888d43548c7ef7dU7w
   3:     0x7f8f9d52168e - rt::unwind::begin_unwind_inner::h6c07c3faf8145c2ayNw
   4:     0x7f8f9a83aba1 - rt::unwind::begin_unwind::h61311074365208902
   5:     0x7f8f9aa98c31 - ptr::P&lt;T&gt;::map::h4262623173329566783
   6:     0x7f8f9aa8953e - ext::expand::expand_expr::closure.64692
   7:     0x7f8f9aa87344 - ext::expand::expand_expr::h5d16b298ec3e6d44S3a
   8:     0x7f8f9aad6e3b - fold::noop_fold_stmt::h2830177968221966586
   9:     0x7f8f9aab2f01 - ext::expand::expand_stmt::ha540a83711e3b587zEb
  10:     0x7f8f9aadf7d3 - ext::expand::expand_block_elts::closure.65399
  11:     0x7f8f9aadf4cc - iter::FlatMap&lt;I, U, F&gt;.Iterator::next::h15931703869202550713
  12:     0x7f8f9aade2b7 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h17304921018562427167
  13:     0x7f8f9aadd873 - ext::expand::expand_block_elts::closure.65393
  14:     0x7f8f9aa9a5d6 - ext::expand::expand_block_elts::hdc0f023594f31dbdvPb
  15:     0x7f8f9aadd57d - ext::expand::expand_block::h154763b840e3f863QOb
  16:     0x7f8f9aa9a004 - ext::expand::expand_and_rename_fn_decl_and_block::he58b2e30da928a59Uic
  17:     0x7f8f9ab05525 - ext::expand::expand_and_rename_method::he352edb1d6a5af96ekc
  18:     0x7f8f9ab0a1cf - ext::expand::expand_impl_item::closure.65811
  19:     0x7f8f9ab06c7f - ext::expand::expand_impl_item::hc5ab3bcbf3bfabe2Dfc
  20:     0x7f8f9aa9db5e - ext::expand::expand_annotatable::h347111f998e00452RZb
  21:     0x7f8f9aaacca5 - ext::expand::MacroExpander&lt;'a, 'b&gt;.Folder::fold_impl_item::h4b925cb3f2b4ecddKnc
  22:     0x7f8f9aaac77d - iter::FlatMap&lt;I, U, F&gt;.Iterator::next::h10775116680282487154
  23:     0x7f8f9aaaca53 - vec::Vec&lt;T&gt;::extend_desugared::h16127363502739536117
  24:     0x7f8f9aaab6bf - iter::Iterator::collect::h10569062580348617273
  25:     0x7f8f9aaa2597 - ext::expand::expand_item_underscore::h1ae9e40d706a69f4Zsb
  26:     0x7f8f9ab047bd - fold::Folder::fold_item_simple::h13015839913330126400
  27:     0x7f8f9ab043f4 - ptr::P&lt;T&gt;::map::h5783195092218359557
  28:     0x7f8f9aa9e6c6 - ext::expand::expand_annotatable::h347111f998e00452RZb
  29:     0x7f8f9aa9a728 - ext::expand::expand_item::h3529ff04c83295ccosb
  30:     0x7f8f9aaa721e - iter::FlatMap&lt;I, U, F&gt;.Iterator::next::h3067849998977955174
  31:     0x7f8f9aaa6007 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h17852130624423508185
  32:     0x7f8f9aaa573c - fold::noop_fold_mod::h8231944226184386280
  33:     0x7f8f9aaa1955 - ext::expand::expand_item_underscore::h1ae9e40d706a69f4Zsb
  34:     0x7f8f9ab047bd - fold::Folder::fold_item_simple::h13015839913330126400
  35:     0x7f8f9ab043f4 - ptr::P&lt;T&gt;::map::h5783195092218359557
  36:     0x7f8f9aa9f127 - ext::expand::expand_annotatable::h347111f998e00452RZb
  37:     0x7f8f9aa9a728 - ext::expand::expand_item::h3529ff04c83295ccosb
  38:     0x7f8f9aaa721e - iter::FlatMap&lt;I, U, F&gt;.Iterator::next::h3067849998977955174
  39:     0x7f8f9aaa5cf4 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h17852130624423508185
  40:     0x7f8f9aaa573c - fold::noop_fold_mod::h8231944226184386280
  41:     0x7f8f9aaa1955 - ext::expand::expand_item_underscore::h1ae9e40d706a69f4Zsb
  42:     0x7f8f9ab047bd - fold::Folder::fold_item_simple::h13015839913330126400
  43:     0x7f8f9ab043f4 - ptr::P&lt;T&gt;::map::h5783195092218359557
  44:     0x7f8f9aa9f127 - ext::expand::expand_annotatable::h347111f998e00452RZb
  45:     0x7f8f9aa9a728 - ext::expand::expand_item::h3529ff04c83295ccosb
  46:     0x7f8f9aaa721e - iter::FlatMap&lt;I, U, F&gt;.Iterator::next::h3067849998977955174
  47:     0x7f8f9aaa6007 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h17852130624423508185
  48:     0x7f8f9aaa573c - fold::noop_fold_mod::h8231944226184386280
  49:     0x7f8f9aaa1955 - ext::expand::expand_item_underscore::h1ae9e40d706a69f4Zsb
  50:     0x7f8f9ab047bd - fold::Folder::fold_item_simple::h13015839913330126400
  51:     0x7f8f9ab043f4 - ptr::P&lt;T&gt;::map::h5783195092218359557
  52:     0x7f8f9aa9f127 - ext::expand::expand_annotatable::h347111f998e00452RZb
  53:     0x7f8f9aa9a728 - ext::expand::expand_item::h3529ff04c83295ccosb
  54:     0x7f8f9ab0d5b9 - ext::expand::expand_crate::hffd65e9f8234e652prc
  55:     0x7f8f9daf3a1d - driver::phase_2_configure_and_expand::closure.21446
  56:     0x7f8f9daa56dc - driver::phase_2_configure_and_expand::h6227118d5a2dbd5dita
  57:     0x7f8f9da94a3a - driver::compile_input::ha9b5fd65b77d50f6Tba
  58:     0x7f8f9db72863 - run_compiler::h240fdc5369e0b898x7b
  59:     0x7f8f9db7023e - boxed::F.FnBox&lt;A&gt;::call_box::h17338777036410156156
  60:     0x7f8f9db6fa89 - rt::unwind::try::try_fn::h2295644814600911096
  61:     0x7f8f9d5d6d38 - rust_try_inner
  62:     0x7f8f9d5d6d25 - rust_try
  63:     0x7f8f9d549ee7 - rt::unwind::try::inner_try::h3a5b73fc117bcddfrJw
  64:     0x7f8f9db6fc9b - boxed::F.FnBox&lt;A&gt;::call_box::h803341546616928030
  65:     0x7f8f9d55d791 - sys::thread::Thread::new::thread_start::h780a1f33992577dcoTv
  66:     0x7f8f97bef353 - start_thread
  67:     0x7f8f9d1b8bfc - __clone
  68:                0x0 - &lt;unknown&gt;
"><pre class="notranslate"><code class="notranslate">$ RUST_BACKTRACE=1 cargo build
   Compiling mdbook v0.0.1 (file:///home/mathieu/Programming/Rust/mdbook)
error: internal compiler error: unexpected panic
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
thread 'rustc' panicked at 'fold_mac disabled by default', ../src/libsyntax/fold.rs:190

stack backtrace:
   1:     0x7f8f9d556c8e - sys::backtrace::write::hba0090c65dc9b973kqs
   2:     0x7f8f9d55eb34 - panicking::on_panic::ha888d43548c7ef7dU7w
   3:     0x7f8f9d52168e - rt::unwind::begin_unwind_inner::h6c07c3faf8145c2ayNw
   4:     0x7f8f9a83aba1 - rt::unwind::begin_unwind::h61311074365208902
   5:     0x7f8f9aa98c31 - ptr::P&lt;T&gt;::map::h4262623173329566783
   6:     0x7f8f9aa8953e - ext::expand::expand_expr::closure.64692
   7:     0x7f8f9aa87344 - ext::expand::expand_expr::h5d16b298ec3e6d44S3a
   8:     0x7f8f9aad6e3b - fold::noop_fold_stmt::h2830177968221966586
   9:     0x7f8f9aab2f01 - ext::expand::expand_stmt::ha540a83711e3b587zEb
  10:     0x7f8f9aadf7d3 - ext::expand::expand_block_elts::closure.65399
  11:     0x7f8f9aadf4cc - iter::FlatMap&lt;I, U, F&gt;.Iterator::next::h15931703869202550713
  12:     0x7f8f9aade2b7 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h17304921018562427167
  13:     0x7f8f9aadd873 - ext::expand::expand_block_elts::closure.65393
  14:     0x7f8f9aa9a5d6 - ext::expand::expand_block_elts::hdc0f023594f31dbdvPb
  15:     0x7f8f9aadd57d - ext::expand::expand_block::h154763b840e3f863QOb
  16:     0x7f8f9aa9a004 - ext::expand::expand_and_rename_fn_decl_and_block::he58b2e30da928a59Uic
  17:     0x7f8f9ab05525 - ext::expand::expand_and_rename_method::he352edb1d6a5af96ekc
  18:     0x7f8f9ab0a1cf - ext::expand::expand_impl_item::closure.65811
  19:     0x7f8f9ab06c7f - ext::expand::expand_impl_item::hc5ab3bcbf3bfabe2Dfc
  20:     0x7f8f9aa9db5e - ext::expand::expand_annotatable::h347111f998e00452RZb
  21:     0x7f8f9aaacca5 - ext::expand::MacroExpander&lt;'a, 'b&gt;.Folder::fold_impl_item::h4b925cb3f2b4ecddKnc
  22:     0x7f8f9aaac77d - iter::FlatMap&lt;I, U, F&gt;.Iterator::next::h10775116680282487154
  23:     0x7f8f9aaaca53 - vec::Vec&lt;T&gt;::extend_desugared::h16127363502739536117
  24:     0x7f8f9aaab6bf - iter::Iterator::collect::h10569062580348617273
  25:     0x7f8f9aaa2597 - ext::expand::expand_item_underscore::h1ae9e40d706a69f4Zsb
  26:     0x7f8f9ab047bd - fold::Folder::fold_item_simple::h13015839913330126400
  27:     0x7f8f9ab043f4 - ptr::P&lt;T&gt;::map::h5783195092218359557
  28:     0x7f8f9aa9e6c6 - ext::expand::expand_annotatable::h347111f998e00452RZb
  29:     0x7f8f9aa9a728 - ext::expand::expand_item::h3529ff04c83295ccosb
  30:     0x7f8f9aaa721e - iter::FlatMap&lt;I, U, F&gt;.Iterator::next::h3067849998977955174
  31:     0x7f8f9aaa6007 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h17852130624423508185
  32:     0x7f8f9aaa573c - fold::noop_fold_mod::h8231944226184386280
  33:     0x7f8f9aaa1955 - ext::expand::expand_item_underscore::h1ae9e40d706a69f4Zsb
  34:     0x7f8f9ab047bd - fold::Folder::fold_item_simple::h13015839913330126400
  35:     0x7f8f9ab043f4 - ptr::P&lt;T&gt;::map::h5783195092218359557
  36:     0x7f8f9aa9f127 - ext::expand::expand_annotatable::h347111f998e00452RZb
  37:     0x7f8f9aa9a728 - ext::expand::expand_item::h3529ff04c83295ccosb
  38:     0x7f8f9aaa721e - iter::FlatMap&lt;I, U, F&gt;.Iterator::next::h3067849998977955174
  39:     0x7f8f9aaa5cf4 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h17852130624423508185
  40:     0x7f8f9aaa573c - fold::noop_fold_mod::h8231944226184386280
  41:     0x7f8f9aaa1955 - ext::expand::expand_item_underscore::h1ae9e40d706a69f4Zsb
  42:     0x7f8f9ab047bd - fold::Folder::fold_item_simple::h13015839913330126400
  43:     0x7f8f9ab043f4 - ptr::P&lt;T&gt;::map::h5783195092218359557
  44:     0x7f8f9aa9f127 - ext::expand::expand_annotatable::h347111f998e00452RZb
  45:     0x7f8f9aa9a728 - ext::expand::expand_item::h3529ff04c83295ccosb
  46:     0x7f8f9aaa721e - iter::FlatMap&lt;I, U, F&gt;.Iterator::next::h3067849998977955174
  47:     0x7f8f9aaa6007 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h17852130624423508185
  48:     0x7f8f9aaa573c - fold::noop_fold_mod::h8231944226184386280
  49:     0x7f8f9aaa1955 - ext::expand::expand_item_underscore::h1ae9e40d706a69f4Zsb
  50:     0x7f8f9ab047bd - fold::Folder::fold_item_simple::h13015839913330126400
  51:     0x7f8f9ab043f4 - ptr::P&lt;T&gt;::map::h5783195092218359557
  52:     0x7f8f9aa9f127 - ext::expand::expand_annotatable::h347111f998e00452RZb
  53:     0x7f8f9aa9a728 - ext::expand::expand_item::h3529ff04c83295ccosb
  54:     0x7f8f9ab0d5b9 - ext::expand::expand_crate::hffd65e9f8234e652prc
  55:     0x7f8f9daf3a1d - driver::phase_2_configure_and_expand::closure.21446
  56:     0x7f8f9daa56dc - driver::phase_2_configure_and_expand::h6227118d5a2dbd5dita
  57:     0x7f8f9da94a3a - driver::compile_input::ha9b5fd65b77d50f6Tba
  58:     0x7f8f9db72863 - run_compiler::h240fdc5369e0b898x7b
  59:     0x7f8f9db7023e - boxed::F.FnBox&lt;A&gt;::call_box::h17338777036410156156
  60:     0x7f8f9db6fa89 - rt::unwind::try::try_fn::h2295644814600911096
  61:     0x7f8f9d5d6d38 - rust_try_inner
  62:     0x7f8f9d5d6d25 - rust_try
  63:     0x7f8f9d549ee7 - rt::unwind::try::inner_try::h3a5b73fc117bcddfrJw
  64:     0x7f8f9db6fc9b - boxed::F.FnBox&lt;A&gt;::call_box::h803341546616928030
  65:     0x7f8f9d55d791 - sys::thread::Thread::new::thread_start::h780a1f33992577dcoTv
  66:     0x7f8f97bef353 - start_thread
  67:     0x7f8f9d1b8bfc - __clone
  68:                0x0 - &lt;unknown&gt;

</code></pre></div>
<p dir="auto"><strong>This is the part of my code that made the compiler panic:</strong></p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn parse_summary(&amp;mut self) -&gt; Result&lt;()&gt; {
        let summary = BufReader::new(try!(File::open(self.config.src().join(&quot;SUMMARY.md&quot;))));

        let mut level = -1;
        for try!(line) in summary.lines() {
            let indent = utilities::indent(&amp;line, 4);

            // If the difference between the current level and the indent level is greater than
            // one then there is a syntax error in SUMMARY.md
            /*if i32::abs(level - indent) &gt; 1 {
                return Error::new(ErrorKind::Other,&quot;Indentation error in SUMMARY.md at line:\n\n&quot;)
            }*/
        }

        Ok(())
    }"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">parse_summary</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-k">mut</span> <span class="pl-smi">self</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Result</span><span class="pl-kos">&lt;</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span>
        <span class="pl-k">let</span> summary = <span class="pl-smi">BufReader</span><span class="pl-kos">::</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-en">try</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-v">File</span>::open<span class="pl-kos">(</span><span class="pl-smi">self</span>.config.src<span class="pl-kos">(</span><span class="pl-kos">)</span>.join<span class="pl-kos">(</span><span class="pl-s">"SUMMARY.md"</span><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-k">let</span> <span class="pl-k">mut</span> level = -<span class="pl-c1">1</span><span class="pl-kos">;</span>
        <span class="pl-k">for</span> <span class="pl-en">try</span><span class="pl-en">!</span><span class="pl-kos">(</span>line<span class="pl-kos">)</span> <span class="pl-k">in</span> summary<span class="pl-kos">.</span><span class="pl-en">lines</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
            <span class="pl-k">let</span> indent = utilities<span class="pl-kos">::</span><span class="pl-en">indent</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span>line<span class="pl-kos">,</span> <span class="pl-c1">4</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

            <span class="pl-c">// If the difference between the current level and the indent level is greater than</span>
            <span class="pl-c">// one then there is a syntax error in SUMMARY.md</span>
            <span class="pl-c">/*if i32::abs(level - indent) &gt; 1 {</span>
<span class="pl-c">                return Error::new(ErrorKind::Other,"Indentation error in SUMMARY.md at line:\n\n")</span>
<span class="pl-c">            }*/</span>
        <span class="pl-kos">}</span>

        <span class="pl-v">Ok</span><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></pre></div>
<p dir="auto">If I comment out the body of the function it works.</p>
<p dir="auto"><strong>Info about my machine:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Arch Linux
cargo 0.3.0-nightly (a2dd2ac 2015-06-24) (built 2015-06-23)
rustc 1.2.0-beta.1 (2ad26e850 2015-06-23)"><pre class="notranslate"><code class="notranslate">Arch Linux
cargo 0.3.0-nightly (a2dd2ac 2015-06-24) (built 2015-06-23)
rustc 1.2.0-beta.1 (2ad26e850 2015-06-23)
</code></pre></div>
<p dir="auto"><strong>I am not sure what info you need, so tell me if I forgot something or you want more code.</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="macro_rules! foo {
    () =&gt; ()
}

pub fn main () {
    for foo!() in (1..) {
    }
}"><pre class="notranslate"><code class="notranslate">macro_rules! foo {
    () =&gt; ()
}

pub fn main () {
    for foo!() in (1..) {
    }
}
</code></pre></div>
<p dir="auto">error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: unexpected panic
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 'fold_mac disabled by default', /home/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libsyntax/fold.rs:190


playpen: application terminated with error code 101"><pre class="notranslate"><code class="notranslate">error: internal compiler error: unexpected panic
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 'fold_mac disabled by default', /home/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libsyntax/fold.rs:190


playpen: application terminated with error code 101
</code></pre></div>
<p dir="auto">version is whatever is considered stable by <code class="notranslate">play.rust-lang.org</code> at 3:30pm UTC+12 13/07/2015, but also for the nightly and beta releases.</p>