Skip to content

RFC: Inheriting of default-features in Cargo - #3945

Merged
ehuss merged 10 commits into
rust-lang:masterfrom
epage:inherit-default
May 4, 2026
Merged

RFC: Inheriting of default-features in Cargo#3945
ehuss merged 10 commits into
rust-lang:masterfrom
epage:inherit-default

Conversation

@epage

@epage epage commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

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
Comment thread text/3945-inherit-default-features.md Outdated
@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

Muscraft commented Apr 8, 2026

Copy link
Copy Markdown
Member

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

rust-rfcbot commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator

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
@ehuss ehuss moved this to FCP merge in Cargo status tracker Apr 14, 2026
@weihanglo

Copy link
Copy Markdown
Member

The changes along the way are so confusing, but at least we work towards a better default.

@rfcbot reviewed
@rust-rfcbot reviewed

(I don't know which works.)

@weihanglo

Copy link
Copy Markdown
Member

No of them works? I need to manually check the box…

@epage

epage commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

rfcbot seems to be stuck: #t-infra > rfcbot unresponsive @ 💬

@rust-rfcbot rust-rfcbot added final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. and removed proposed-final-comment-period Currently awaiting signoff of all team members in order to enter the final comment period. labels Apr 24, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@rust-rfcbot rust-rfcbot added finished-final-comment-period The final comment period is finished for this RFC. to-announce and removed final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. labels May 4, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

@ehuss
ehuss merged commit 0624487 into rust-lang:master May 4, 2026
@ehuss

ehuss commented May 4, 2026

Copy link
Copy Markdown
Contributor

Thanks everyone! To track further discussion, subscribe to the tracking issue here: rust-lang/cargo#16959

@epage
epage deleted the inherit-default branch May 4, 2026 15:00
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. finished-final-comment-period The final comment period is finished for this RFC. T-cargo Relevant to the Cargo team, which will review and decide on the RFC. to-announce

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants