Doc tests run by cargo test
do not include rustflags from .cargo/config
#6650
Labels
C-bug
Category: bug
Problem
We can specify
RUSTFLAGS
for a workspace in.cargo/config
, like so:Cargo dutifully passes those flags on to the compiler when you invoke
cargo build
orcargo run
for that target. It also seems to mostly pass them on when you runcargo test
, with one exception: when building the doctest binary. My expectation is that Cargo should set these compiler flags when building the doctest binary.Steps
.cargo/config
file specifying someRUSTFLAGS
.cargo build --verbose
and note the presence of/opt/CANARY/lib
in the compiler invocation.cargo test --verbose
and note the absence of/opt/CANARY/lib
when building the rustdoc binary:Possible Solution(s)
Beats me, though I would love to use this to get back to contributing something to rustdoc :-)
Notes
Output of
cargo version
:The text was updated successfully, but these errors were encountered: