title: Failed building the Rust documentation: The system cannot find the path specified
body: <p>I'm on Windows, trying to build the Rust documentation.</p>
  <p>I cloned the Rust repository, copied the <code>config.toml.example</code> under the name <code>config.toml</code> and executed <code>./x.py doc</code> but here is the error I get (with the <code>RUST_BACKTRACE</code> environment variable set to <code>full</code>):</p>
  <pre class="lang-sh prettyprint-override"><code>~\source\repos\rust [master ≡]&gt; ./x.py doc
  ~\source\repos\rust [master ≡]&gt; Updating only changed submodules
  Submodules updated in 0.08 seconds
      Finished dev [unoptimized + debuginfo] target(s) in 0.41s
  thread 'main' panicked at 'fs::read_dir(builder.src.join(&amp;relative_path).join(&quot;redirects&quot;)) failed with The system cannot find the path specified. (os error 3)', src\bootstrap\doc.rs:243:21
  stack backtrace:
     0:     0x7ff7a88e481f - std::backtrace_rs::backtrace::dbghelp::trace
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98
     1:     0x7ff7a88e481f - std::backtrace_rs::backtrace::trace_unsynchronized
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
     2:     0x7ff7a88e481f - std::sys_common::backtrace::_print_fmt
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\sys_common\backtrace.rs:67
     3:     0x7ff7a88e481f - std::sys_common::backtrace::_print::{{impl}}::fmt
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\sys_common\backtrace.rs:46
     4:     0x7ff7a89029da - core::fmt::write
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\core\src\fmt\mod.rs:1110
     5:     0x7ff7a88df148 - std::io::Write::write_fmt&lt;std::sys::windows::stdio::Stderr&gt;
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\io\mod.rs:1588
     6:     0x7ff7a88e8356 - std::sys_common::backtrace::_print
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\sys_common\backtrace.rs:49
     7:     0x7ff7a88e8356 - std::sys_common::backtrace::print
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\sys_common\backtrace.rs:36
     8:     0x7ff7a88e8356 - std::panicking::default_hook::{{closure}}
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\panicking.rs:208
     9:     0x7ff7a88e7e39 - std::panicking::default_hook
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\panicking.rs:225
    10:     0x7ff7a88e89b5 - std::panicking::rust_panic_with_hook
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\panicking.rs:622
    11:     0x7ff7a88e85a1 - std::panicking::begin_panic_handler::{{closure}}
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\panicking.rs:519
    12:     0x7ff7a88e513f - std::sys_common::backtrace::__rust_end_short_backtrace&lt;closure-0,!&gt;
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\sys_common\backtrace.rs:141
    13:     0x7ff7a88e84f9 - std::panicking::begin_panic_handler
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\panicking.rs:515
    14:     0x7ff7a890ad7c - std::panicking::begin_panic_fmt
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\panicking.rs:457
    15:     0x7ff7a8166b14 - bootstrap::doc::{{impl}}::run
                                 at C:\Users\jerome\source\repos\rust\src\bootstrap\doc.rs:243
    16:     0x7ff7a8349024 - bootstrap::builder::Builder::ensure&lt;bootstrap::doc::TheBook&gt;
                                 at C:\Users\jerome\source\repos\rust\src\bootstrap\builder.rs:1563
    17:     0x7ff7a81661a0 - bootstrap::doc::{{impl}}::make_run
                                 at C:\Users\jerome\source\repos\rust\src\bootstrap\doc.rs:200
    18:     0x7ff7a80eff44 - bootstrap::builder::StepDescription::maybe_run
                                 at C:\Users\jerome\source\repos\rust\src\bootstrap\builder.rs:181
    19:     0x7ff7a80f0402 - bootstrap::builder::StepDescription::run
                                 at C:\Users\jerome\source\repos\rust\src\bootstrap\builder.rs:202
    20:     0x7ff7a80f42b9 - bootstrap::builder::Builder::run_step_descriptions
                                 at C:\Users\jerome\source\repos\rust\src\bootstrap\builder.rs:610
    21:     0x7ff7a80f3f7d - bootstrap::builder::Builder::execute_cli
                                 at C:\Users\jerome\source\repos\rust\src\bootstrap\builder.rs:590
    22:     0x7ff7a7f25950 - bootstrap::Build::build
                                 at C:\Users\jerome\source\repos\rust\src\bootstrap\lib.rs:620
    23:     0x7ff7a7f11773 - bootstrap::main
                                 at C:\Users\jerome\source\repos\rust\src\bootstrap\bin\main.rs:33
    24:     0x7ff7a7f127eb - core::ops::function::FnOnce::call_once&lt;fn(),tuple&lt;&gt;&gt;
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\library\core\src\ops\function.rs:227
    25:     0x7ff7a7f126db - std::sys_common::backtrace::__rust_begin_short_backtrace&lt;fn(),tuple&lt;&gt;&gt;
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\library\std\src\sys_common\backtrace.rs:125
    26:     0x7ff7a7f11101 - std::rt::lang_start::{{closure}}&lt;tuple&lt;&gt;&gt;
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\library\std\src\rt.rs:49
    27:     0x7ff7a88e8f0a - core::ops::function::impls::{{impl}}::call_once
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\library\core\src\ops\function.rs:280
    28:     0x7ff7a88e8f0a - std::panicking::try::do_call
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\panicking.rs:401
    29:     0x7ff7a88e8f0a - std::panicking::try
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\panicking.rs:365
    30:     0x7ff7a88e8f0a - std::panic::catch_unwind
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\panic.rs:434
    31:     0x7ff7a88e8f0a - std::rt::lang_start_internal
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\/library\std\src\rt.rs:34
    32:     0x7ff7a7f110df - std::rt::lang_start&lt;tuple&lt;&gt;&gt;
                                 at /rustc/bf62f4de32a085c1080d9e77b1b73f1a8e42cce2\library\std\src\rt.rs:48
    33:     0x7ff7a7f11d66 - main
    34:     0x7ff7a8909ac4 - invoke_main
                                 at D:\agent\_work\9\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
    35:     0x7ff7a8909ac4 - __scrt_common_main_seh
                                 at D:\agent\_work\9\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
    36:     0x7fff5ee37034 - BaseThreadInitThunk
    37:     0x7fff5f302651 - RtlUserThreadStart
  Build completed unsuccessfully in 0:00:02
  </code></pre>
  <p>I tried under Ubuntu with WSL but I get the same error.</p>
  <p>I tried Googling this error but found nothing and the <a href="https://github.com/rust-lang/rust#building-documentation" rel="nofollow noreferrer">Rust Readme</a> is saying nothing special except the command I ran</p>
  <p>Could you please tell me what am I missing and how to build the documentation?
  I'd like to end up with Markdown files so I can read the book on my phone while being offline.</p>
  <p>Thanks for your answer</p>