cargo doc --examples ... aborts if there are no examples #14776
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-doc
S-needs-team-input
Status: Needs input from team on whether/how to proceed.
Problem
I use an alias for this command:
cargo doc -v --open --workspace --document-private-items --all-features --no-deps --examples
When first developing a new project, there are no examples yet. The output is:
"
warning: target filter
examples
specified, but no targets matched; this is a no-opFinished
dev
profile [unoptimized + debuginfo] target(s) in 0.01serror: no crates with documentation
"
So it is NOT a "no-op". I believe it should be. The warning alone is fine.
Proposed Solution
Instead of failing to provide crate documentation, it should create crate documentation even if there's no examples yet.
Notes
No response
The text was updated successfully, but these errors were encountered: