rust-lang / rust-lang/rust

cargo-rustdoc: `error: too many file operands` when experimental feature `-w` is passed without parameters

Open
#132,718 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-CLI A-diagnostics C-bug D-incorrect requires-nightly T-rustdoc
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

When i try to run this command : cargo +nightly rustdoc -- -Z unstable-options -w

Rustdoc returns this error :

error: too many file operands

Which confuses me. I mean, i didn't passed any file format, so how can there be too many of them ?

We should have a clearer error, something like this :

error: no output format given after `-w`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the command cargo +nightly rustdoc -- -Z unstable-options -w and trace rustdoc's handling of the -w option. Done means replacing the misleading too many file operands message with a clear missing-output-format error and covering the behavior with a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.