Skip to content

NOT READY FOR REVIEW: feat(toml): allow overriding inherited default-features in 2024#17126

Draft
0xPoe wants to merge 4 commits into
rust-lang:masterfrom
0xPoe:poe-patch-inherit-default-features
Draft

NOT READY FOR REVIEW: feat(toml): allow overriding inherited default-features in 2024#17126
0xPoe wants to merge 4 commits into
rust-lang:masterfrom
0xPoe:poe-patch-inherit-default-features

Conversation

@0xPoe

@0xPoe 0xPoe commented Jun 21, 2026

Copy link
Copy Markdown
Member

What does this PR try to resolve?

close #16959

Implement RFC 3945, on Edition 2024+ allow workspace members to override the workspace dependency's default-features setting.

Earlier editions are unchanged: setting default-features on an inherited dependency is still ignored with a warning.

Also, this change would allow cargo add X --no-default-features -p Y, but only on Edition 2024+.

How to test and review this PR?

Review and check it commit by commit.

r?@ghost

0xPoe added 4 commits June 22, 2026 00:11
Impl RFC 3945, on Edition 2024+ allow workspace members
to override the workspace dependency's `default-features` setting.

Earlier editions are unchanged: setting `default-features` on an
inherited dependency is still ignored with a warning.

Signed-off-by: 0xPoe <techregister@pm.me>
Signed-off-by: 0xPoe <techregister@pm.me>
`cargo add --no-default-features` (or `--default-features`) against a
dependency inherited from `[workspace.dependencies]` is now allowed when
the package is on Edition 2024+, matching the manifest behavior. Earlier
editions still error, pointing the user to the workspace manifest.

Signed-off-by: 0xPoe <techregister@pm.me>
Signed-off-by: 0xPoe <techregister@pm.me>
@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation A-manifest Area: Cargo.toml issues Command-add labels Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-documenting-cargo-itself Area: Cargo's documentation A-manifest Area: Cargo.toml issues Command-add

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracking Issue for inherit-default-features

2 participants