]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #49654 - davidtwco:issue-29893, r=alexcrichton
authorkennytm <kennytm@gmail.com>
Thu, 5 Apr 2018 08:51:25 +0000 (16:51 +0800)
committerkennytm <kennytm@gmail.com>
Thu, 5 Apr 2018 10:37:28 +0000 (18:37 +0800)
Host compiler documentation: Include private items

Fixes #29893. Now that compiler documentation is being hosted, including private items seems sensible as these types are going to be being used by contributors working on the compiler.

However, including this means that doc comments that contain codeblocks with invalid Rust and can fail the documenting of a given crate (as evidenced by the changes in the second commit included in this PR). We'd need some way of ensuring that this cannot happen so that these failures don't cause documenting to fail. I'm unsure whether this change to documentation steps will cause this to happen already or if something new will be required.

r? @alexcrichton

1  2 
src/bootstrap/doc.rs
src/librustc/traits/select.rs

index f07c3e707574b4e4a051fc6e9b1f9e0950b82917,06340a4e98a47f3029611f498493106cac0b62ac..4237ded2215c218e4fd8ed16e4d7d4a795fecc4b
@@@ -695,9 -693,10 +695,10 @@@ impl Step for Rustc 
          // We do not symlink to the same shared folder that already contains std library
          // documentation from previous steps as we do not want to include that.
          build.clear_if_dirty(&out, &rustdoc);
 -        t!(symlink_dir_force(&out, &out_dir));
 +        t!(symlink_dir_force(&builder.config, &out, &out_dir));
  
          let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "doc");
+         cargo.env("RUSTDOCFLAGS", "--document-private-items");
          compile::rustc_cargo(build, &mut cargo);
  
          // Only include compiler crates, no dependencies of those, such as `libc`.
Simple merge