Support target.'cfg(..)'.rustdocflags analogously to rustflags#16846
Support target.'cfg(..)'.rustdocflags analogously to rustflags#16846weihanglo merged 2 commits intorust-lang:masterfrom
Conversation
|
r? @epage rustbot has assigned @epage. Use Why was this reviewer chosen?The reviewer was selected based on:
|
There was a problem hiding this comment.
Looks good!
Let me know if you want to work on the other missing part -Zhost-config support: #16761 (comment)
Addressed the remaining host config parity point now. Changes included:
Local validation passed:
|
d6d2734 to
65ace47
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Thanks for catching this @weihanglo and no worries! just dropped the also re ran local validation on the rewritten branch:
|
Update cargo submodule 5 commits in 101549dddbd2b08e806f50154e3aa4cb3374cc21..eb94155a9a60943bd7b1cb04abec42f5d0de6ddc 2026-04-08 12:51:20 +0000 to 2026-04-09 13:10:20 +0000 - Revert "GitHub fast path uses `http_async`" (rust-lang/cargo#16861) - Correct spelling in cargo info man page (rust-lang/cargo#16863) - chore: Update annotate-snippets to 0.12.15 (rust-lang/cargo#16859) - fix(test): strip RUSTUP_TOOLCHAIN_SOURCE from test environment (rust-lang/cargo#16857) - Support target.'cfg(..)'.rustdocflags analogously to rustflags (rust-lang/cargo#16846) r? ghost
Rollup merge of #155042 - weihanglo:update-cargo, r=weihanglo Update cargo submodule 5 commits in 101549dddbd2b08e806f50154e3aa4cb3374cc21..eb94155a9a60943bd7b1cb04abec42f5d0de6ddc 2026-04-08 12:51:20 +0000 to 2026-04-09 13:10:20 +0000 - Revert "GitHub fast path uses `http_async`" (rust-lang/cargo#16861) - Correct spelling in cargo info man page (rust-lang/cargo#16863) - chore: Update annotate-snippets to 0.12.15 (rust-lang/cargo#16859) - fix(test): strip RUSTUP_TOOLCHAIN_SOURCE from test environment (rust-lang/cargo#16857) - Support target.'cfg(..)'.rustdocflags analogously to rustflags (rust-lang/cargo#16846) r? ghost
What does this PR try to resolve?
Resolves #16761 by supporting
target.'cfg(..)'.rustdocflagswith behavior analogous totarget.'cfg(..)'.rustflags.Before this change,
target.'cfg(..)'.rustdocflagswas ignored and warned as an unused key. This PR brings cfg-basedrustdocflagssupport to parity with existing cfg-basedrustflagsbehavior.This PR is intentionally split into two atomic commits:
test: cover ignored target cfg rustdocflags behaviorfix: support target cfg rustdocflagsrustdocflagssupport.target.<cfg>.rustdocflags.How to test and review this PR?
Suggested review order by commit:
test: cover ignored target cfg rustdocflags behaviorfix: support target cfg rustdocflagsFocused tests:
cargo test -p cargo --test testsuite -- rustdocflags::target_cfg_rustdocflags -- --test-threads=1Full rustdocflags module:
cargo test -p cargo --test testsuite -- rustdocflags:: -- --test-threads=1Local validation run for this branch included:
cargo buildcargo clippy -- -D warningscargo test -p cargo --test testsuite -- rustdocflags:: -- --test-threads=1