Add doc comments and doctests to lib.rs
generated by cargo init
#15210
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-init
Command-new
S-triage
Status: This issue is waiting on initial triage.
Problem
Currently,
lib.rs
generated bycargo init
(orcargo new
) has no doc comments and doctests.cargo/src/cargo/ops/cargo_new.rs
Lines 877 to 880 in 5946db3
I think it would be better if the
add
function had doc comments and doctests. I think these are useful examples of what happens when we runcargo doc
andcargo test
.Proposed Solution
Add doc comments and doctests like this:
Notes
No response
The text was updated successfully, but these errors were encountered: