rustdoc: unstable --test-builder option is parsed incorrectly ("too many file operands") #80893
Labels
C-bug
Category: This is a bug.
requires-nightly
This issue requires a nightly compiler in some way.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Preliminary experimentation with making Miri run doc-tests leads me to believe this is a bug. I tried invoking this command:
Most of these arguments are provided by cargo and just being passed through
cargo-miri
, I only append the--sysroot PATH --test-builder PATH
part at the end. With or without the--sysroot
option, I geterror: too many file operands
. I don't get that error when omitting the final path tocargo-miri
(i.e. using--test-builder
as a flag without any arguments).That error originates here, but after a bit of digging through
librustdoc
, I believe this:rust/src/librustdoc/lib.rs
Lines 414 to 420 in 9775ffe
...should really call
optopt
instead ofoptflag
.I don't really know this codebase or even the
getopts
library, so I might be off base here. I don't have a build environment set up to test my hypothesis though, so I was hoping someone more familiar could do a quick sanity check for me, or even fix the issue by the time I could try this "quick" change myself. (I won't have time to set up the build environment until tomorrow afternoon, at the earliest...)I suppose I could also just be grossly misunderstanding how this option is supposed to work, in which case it'd be great if someone could enlighten me.
The text was updated successfully, but these errors were encountered: