Rollup merge of #150022 - GuillaumeGomez:rustc-macro-expansion, r=kobzol

Generate macro expansion for rust compiler crates docs

This enables the `--generate-macro-expansion` rustdoc flag, generating possibility to expand macros directly in source code pages (https://github.com/rust-lang/rust/pull/137229).

Needed this new feature when I was working on https://github.com/rust-lang/rust/pull/149919 and I thought "why not enable it by default?". So here we go.

Not too sure who to r? here so:

r? ``@kobzol``
This commit is contained in:
Jonathan Brouwer 2025-12-18 18:37:17 +01:00 committed by GitHub
commit b53dd2d520
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -932,6 +932,7 @@ impl Step for Rustc {
// 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");
cargo.rustdocflag("--generate-macro-expansion");
compile::rustc_cargo(builder, &mut cargo, target, &build_compiler, &self.crates);
cargo.arg("-Zskip-rustdoc-fingerprint");