Skip to content

Conversation

weihanglo
Copy link
Member

rustdoc's --emit=depinfo flag now supports using - to write the output to stdout,
aligning with rustc's behavior.

This will fix #147649.

How to review

  • The first commit demonstrates that rustdoc --emit=depinfo=- hasn't yet supported emitting to stdout.
  • The second implements it and the diff shows how the behavior changes.

This commit demonstrates that `rustdoc --emit=depinfo=-` hasn't yet
supported emitting to stdout.
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 16, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 16, 2025

r? @GuillaumeGomez

rustbot has assigned @GuillaumeGomez.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@weihanglo weihanglo changed the title test(rustdoc): depinfo cannot be emitted to stdout feat(rustdoc): --emit=depinfo output to stdout via - Oct 16, 2025
Comment on lines 326 to 329
/// Similar to [`rustc_session::config::OutFileName`] but can't use that
/// because it doesn't implement `Eq`.
#[derive(Clone, Debug, PartialEq, Eq)]
pub(crate) enum OutFile {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to make rustc's OutFile Eq (and pub if it isn't already) and use it here. We already reuse rustc's Input type.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. I wasn't sure whether it is allowed. Thanks :)

rustdoc's `--emit=depinfo` flag now supports using `-`
to write the output to stdout.
@weihanglo weihanglo force-pushed the rustdoc-depinfo-stdout branch from a835408 to e7130d3 Compare October 16, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rustdoc's --emit=dep-info=- doesn't output to STDOUT unlike rustc's

4 participants