-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
rustdoc: --show-coverage --output-format=json doesn't respect -o, but the docs suggest it will. #158929
Copy link
Copy link
Closed
Labels
A-doc-coverageArea: Calculating how much of a crate has documentationArea: Calculating how much of a crate has documentationA-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-internalsRelevant to the rustdoc internals team, which will review and decide on the PR/issue.Relevant to the rustdoc internals team, which will review and decide on the PR/issue.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-doc-coverageArea: Calculating how much of a crate has documentationArea: Calculating how much of a crate has documentationA-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-internalsRelevant to the rustdoc internals team, which will review and decide on the PR/issue.Relevant to the rustdoc internals team, which will review and decide on the PR/issue.
In the docs for
--show-coverage --output-format=jsonwe say:-- https://github.com/rust-lang/rust/blob/f10db292a3733b5c67c8da8c7661195ff4b05774/src/doc/rustdoc/src/unstable-features.md#json-output
This is true!
But if you use
-o file.jsonit still prints to stdout:In fact, rustdoc always prints to stdout, and the
-oflag does nothing:rust/src/librustdoc/passes/calculate_doc_coverage.rs
Lines 132 to 138 in f10db29
The docs should be updated to be clear about this.
Also, maybe
--emit=dep-infoshouldn't be supported when using--show-coverage, and there's no "output file" to speak of.