Open
Description
A command line option to pass program arguments to the underlying compiler building doctests.
Original issue motivating this feature: #67533.
Steps
- Implementation PR
- Stabilization PR (see instructions on rustc-dev-guide)
Unresolved Questions
- Should argument parsing be closer to what already exists for RUSTFLAGS (whitespace splitting and nothing else) or should it be closer to how shell parses input (take into account escaped characters and quote characters)? Or should we offer two options, one that works like RUSTFLAGS for human users and one that works like CARGO_ENCODED_RUSTLFAGS for tool usage? Update: #137096 (comment) changed the requirements and #139863 the design!
- From #139863: Even though we don't process the argument passed to
--doctest-build-arg
, we end up passing it via an argument file (rustc @argfile
) which delimits arguments by line break (LF or CRLF, via) meaning ultimately the arguments still get split which is unfortunate. Is there are good way to resolve this (obvious but intrusive solution: smh signal torustc
not to split inside the argsfile)?
Implementation History
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status