Skip to content
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

cargo rustdoc does not pass extra arguments when documenting a binary #8445

Closed
jyn514 opened this issue Jul 2, 2020 · 2 comments · Fixed by #8449
Closed

cargo rustdoc does not pass extra arguments when documenting a binary #8445

jyn514 opened this issue Jul 2, 2020 · 2 comments · Fixed by #8449
Labels

Comments

@jyn514
Copy link
Member

jyn514 commented Jul 2, 2020

Problem
cargo rustdoc does not pass any arguments to the rustdoc binary when documenting a binary instead of a library.

Steps

$ cargo new bin
     Created binary (application) `bin` package
$ cd bin
$ cargo rustdoc -v --bin bin -- --this-flag-is-invalid
Documenting bin v0.1.0 (/home/joshua/src/bin)
     Running `rustdoc --edition=2018 --crate-type bin --crate-name bin src/main.rs -o /home/joshua/.local/lib/cargo/target/doc --error-format=json --json=diagnostic-rendered-ansi --document-private-items -L dependency=/home/joshua/.local/lib/cargo/target/debug/deps`
    Finished dev [unoptimized + debuginfo] target(s) in 0.46s

Possible Solution(s)

Notes

Output of cargo version: cargo 1.46.0-nightly (c26576f9a 2020-06-23) (but this also happens on 1.44.1 stable)

@jyn514
Copy link
Member Author

jyn514 commented Jul 2, 2020

Relevant code:

if rustdoc_document_private_items || unit.target.is_bin() {

@jyn514
Copy link
Member Author

jyn514 commented Jul 4, 2020

I'm interested in working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants