Rollup merge of #151092 - generate-macro-expansion-compiler-crates-docs, r=jieyouxu

Generate macro expansion for rust compiler crates docs

Re-enable https://github.com/rust-lang/rust/pull/150022, which was disabled in https://github.com/rust-lang/rust/pull/149831 because some fixes hadn't been merged then.

r? @jieyouxu
This commit is contained in:
Stuart Cook
2026-01-17 11:47:18 +11:00
committed by GitHub
@@ -932,6 +932,13 @@ fn run(self, builder: &Builder<'_>) {
// see https://github.com/rust-lang/rust/pull/122066#issuecomment-1983049222
// If there is any bug, please comment out the next line.
cargo.rustdocflag("--generate-link-to-definition");
// FIXME: Currently, `--generate-macro-expansion` option is buggy in `beta` rustdoc. To
// allow CI to pass, we only enable the option in stage 2 and higher.
// cfg(bootstrap)
// ^ Adding this so it's not forgotten when the new release is done.
if builder.top_stage > 1 {
cargo.rustdocflag("--generate-macro-expansion");
}
compile::rustc_cargo(builder, &mut cargo, target, &build_compiler, &self.crates);
cargo.arg("-Zskip-rustdoc-fingerprint");