-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doc tests run by cargo test
do not include rustflags from .cargo/config
#6650
Comments
I noticed that setting However, it seems that Rustdoc now does take So maybe you'd like to reconsider passing |
Also, rustdoc uses a separate |
Thanks! 🎉 |
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: