Skip to content

--emit=dep-info + -Zunpretty=expanded emits output #93201

Open
@ojeda

Description

@ojeda

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-CLIArea: Command-line interface (CLI) to the compilerC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions