Skip to content

RFC: Inheriting of default-features in Cargo#3945

Open
epage wants to merge 9 commits intorust-lang:masterfrom
epage:inherit-default
Open

RFC: Inheriting of default-features in Cargo#3945
epage wants to merge 9 commits intorust-lang:masterfrom
epage:inherit-default

Conversation

@epage
Copy link
Copy Markdown
Contributor

@epage epage commented Apr 6, 2026

Allow disabling default features locally when inheriting a dependency.

[workspace]

[workspace.dependencies]
serde = "1"
[package]
name = "foo"

[dependencies]
serde = { workspace = true, default-features = false }

Without this RFC, it is an error, see rust-lang/cargo#12162

Important

Since RFCs involve many conversations at once that can be difficult to follow, please use review comment threads on the text changes instead of direct comments on the RFC.

If you don't have a particular section of the RFC to comment on, you can click on the "Comment on this file" button on the top-right corner of the diff, to the right of the "Viewed" checkbox. This will create a separate thread even if others have commented on the file too.

Rendered

@epage epage added the T-cargo Relevant to the Cargo team, which will review and decide on the RFC. label Apr 6, 2026
@epage epage changed the title Inherit default RFC: Inheriting of default-features in Cargo Apr 6, 2026
@joshtriplett
Copy link
Copy Markdown
Member

This seems reasonable.

Long-term, I hope we have a general mechanism for opting out of specific features that supersedes default-features = false. But short-term, I think this RFC makes sense as proposed, to make default-features = false make more sense with workspace inheritance.

@Muscraft
Copy link
Copy Markdown
Member

Muscraft commented Apr 8, 2026

Given that this seems pretty straightforward and that multiple Cargo team members have had a chance to review it, I would like to start the FCP process.

@rfcbot fcp merge cargo

@rust-rfcbot
Copy link
Copy Markdown
Collaborator

rust-rfcbot commented Apr 8, 2026

Team member @Muscraft has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Currently awaiting signoff of all team members in order to enter the final comment period. disposition-merge This RFC is in PFCP or FCP with a disposition to merge it. labels Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This RFC is in PFCP or FCP with a disposition to merge it. proposed-final-comment-period Currently awaiting signoff of all team members in order to enter the final comment period. T-cargo Relevant to the Cargo team, which will review and decide on the RFC.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants