`rustdoctest` doesn't pass `--help` to custom runners
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.2k
- PR merge metrics
- PR metrics pending
Description
Running cargo test --doc -- -h with a custom runner doesn't pass -h to the custom runner, but instead emits the help page generated from libtest.
I didn't dig into the details, but presumably Cargo runs doctests by libtest first, which then invokes the runner. Ergo when detecting -h and a custom runner is configured, it should pass it along instead of handling that itself.
Meta
rustc --version --verbose:
rustc 1.93.0 (254b59607 2026-01-19)
binary: rustc
commit-hash: 254b59607d4417e9dffbc307138ae5c86280fe4c
commit-date: 2026-01-19
host: x86_64-unknown-linux-gnu
release: 1.93.0
LLVM version: 21.1.8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing cargo test --doc -- -h with a custom runner, then trace how Cargo doctests and libtest handle help arguments before invoking the runner. The issue is done when -h is forwarded to the configured custom runner instead of producing only the libtest help page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100