Skip to content

Ability to suppress "Generated" lines from cargo doc #13336

@kpreid

Description

@kpreid

Problem

Since Rust 1.75, when cargo doc is run without --open, it prints "Generated <path>" for each documented crate in the workspace (#5562). While this is useful when users wish to open the documentation by some other means than --open, it's clutter (~doubling the height of the output) in a large workspace when the user already has the documentation open or has other means to access the path the documentation will be generated at.

Proposed Solution

Add a configuration option which suppresses “Generated” lines.

Alternatively, make cargo doc emit only one such line for the entire workspace, in the same way that cargo doc --open picks one path; this could be an option or might even be acceptable as the default behavior.

Notes

--quiet is not an adequate solution since it hides all output, including progress when re-documenting dependencies from clean.

The reason I personally care about this is that running cargo doc is part of my normal development cycle — if I don't run it, I won't discover I've broken an intra-doc link, which happens very often. So, I want the output to be short if nothing is wrong, but still let me see progress. (If cargo check reported broken intra-doc links and other doc lints, that would be an even better alternative, but I don't expect that to be feasible.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-console-outputArea: Terminal output, colors, progress bar, etc.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-docS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions