rustdoc: Replace unstable flag --doctest-compilation-args with a simpler one: --doctest-build-arg by fmease · Pull Request #139863 · rust-lang/rust (original) (raw)

Tracking issue: #134172.
Context: #137096 (comment)

Yeets the ad hoc shell-like lexer for 'nested' program arguments.
No FCP necessary since the flag is unstable.

I've chosen to replace compilation with build because it's shorter (you now need to pass it multiple times in order to pass many arguments to the doctest compiler, so it matters a bit) and since I prefer it esthetically.

Issue: 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. Still, I think this change is an improvement over the status quo.

I'll update the tracking issue if/once this PR merges. I'll also add the (CR)LF issue to 'unresolved question'.

r? GuillaumeGomez
r? notriddle