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
@fmease fmease assigned fmease and unassigned GuillaumeGomez Oct 17, 2025
@fmease
Copy link
Member

fmease commented Oct 22, 2025

Thanks! @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 22, 2025

📌 Commit e7130d3 has been approved by fmease

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 22, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 22, 2025
…r=fmease

feat(rustdoc): `--emit=depinfo` output to stdout via `-`

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

This will fix <rust-lang#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.
bors added a commit that referenced this pull request Oct 23, 2025
Rollup of 4 pull requests

Successful merges:

 - #115501 (Add new inherit_handles flag to CommandExt trait)
 - #146629 (std: reorganize the UNIX-internal `weak` module)
 - #147762 (feat(rustdoc): `--emit=depinfo` output to stdout via `-`)
 - #148001 (fix: Don't add diff symbol to unchanged lines)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b397b6b into rust-lang:master Oct 23, 2025
11 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 23, 2025
rust-timer added a commit that referenced this pull request Oct 23, 2025
Rollup merge of #147762 - weihanglo:rustdoc-depinfo-stdout, r=fmease

feat(rustdoc): `--emit=depinfo` output to stdout via `-`

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.
@weihanglo weihanglo deleted the rustdoc-depinfo-stdout branch October 23, 2025 12:34
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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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

5 participants