-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add document-private-items flag to cargo doc #5543
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @matklad (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Could this be handled by using |
I tried to use it, but couldn't figure out how to make it work. Reason is, I'm using xargo and my crate only compiles for a specific target (it errors out on others). So to document it, I need the ability to specify a specific target, e.g. I'm pretty sure I could somehow figure out the correct sequence of commands to get rustdoc to do what I want, but it seemed easier to just add the ability to document private items in |
Hm, looks like this is a bug in |
Support `--target` argument in `cargo rustdoc` We don't support `--target` in `cargo rustdoc`. Seems like an omission to me? We support it in `cargo rustc`. Discovered in #5543 (comment).
@roblabla now cargo rustdoc supports the —target flag. Will it work for your case? |
ping @roblabla, any updates on this PR? It looks like it may be ready to go with a test? |
Yeah, this PR should work (I've been using it in a personal project for a while now). I'll add a test case. I suppose it would go in |
Indeed! |
@roblabla any luck adding the test case? |
Alright, sorry for the long wait, I finally got around to adding a proper test case for this. |
@bors: r+ Thanks! |
📌 Commit 7757753 has been approved by |
Add document-private-items flag to cargo doc Add a `--document-private-items` flag to `cargo doc`, that mimics the equivalent `cargo rustdoc -- --document-private-items`. This works by relaying the flag to the underlying rustdoc call.
☀️ Test successful - status-appveyor, status-travis |
Add a
--document-private-items
flag tocargo doc
, that mimics the equivalentcargo rustdoc -- --document-private-items
. This works by relaying the flag to the underlying rustdoc call.