The unpretty rules expose rustc's -Zunpretty=<mode> flag as a Bazel action. Given a Rust target, they emit an alternate textual representation of it — the fully macro-expanded source, the HIR, the MIR CFG, etc. — useful for inspecting what the compiler sees after macro expansion, lowering, or optimization.
Because -Zunpretty is a nightly-only compiler flag, these rules require a nightly rust_toolchain to be registered.
--aspects=@rules_rust//rust:defs.bzl%rust_unpretty_aspect --output_groups=+rust_unpretty) to emit the representation for every Rust target in the build without adding rule instances.