Add the ability to overide the out-dir
settings passed to rust-doc
#14791
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-design
Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Problem
Quick definitions :
rustdoc
only.cargo rustdoc
.If we want to get the output of rustdoc to a certain location (to process them, for example), we can use the
out-dir
option on the rustdoc command to specify that location.If we use the cargo command, cargo will set that option for us. That's a very good behavior in general, but that also means we can't override it with our value if we wanted to.
If we try (using for example the command
cargo rustdoc -- --out-dir=<dir>
), we will get that error :If one want to override
out-dir
, he will have to use the rustdoc command directly, which means he will have to do all the work cargo can do. For example, handling all the source code, all the dependencies, etc. That adds a lot of overhead, especially since the rustdoc command is not obvious to set up correctly (at least that's my opinion).Proposed Solution
Cargo should detect if the
out-dir
option is already present, and only fill it when it's not there.Notes
If that feature is accepted, I'm willing to implement it myself.
The text was updated successfully, but these errors were encountered: