--emit=dep-info + -Zunpretty=expanded emits output · Issue #93201 · rust-lang/rust (original) (raw)

In 1.58, running:

echo 'fn main() {}' | rustc --emit=dep-info,obj,metadata -

will generate .d, .o and .rmeta files, as expected. However, running with -Zunpretty=expanded:

echo 'fn main() {}' | rustc --emit=dep-info,obj,metadata -Zunpretty=expanded -

will generate the .d only. I would have expected that rustc does not generate any file, or that it generates all of them, or that it complains if --emit and -Zunpretty are supposed to be incompatible with each other. Should users avoid mixing both at the moment?

(I assume that, eventually, --emit=dep-info,expanded would give the dependency information about the expanded output file like it does for the others; which is fine)

It also happens with e.g. -Zunpretty=hir, but not with -Zunpretty=normal or -Zunpretty=ast-tree; thus it looks like a consequence of which passes are executed in the compiler.

Possibly related: #60857.