Skip to content

Feature Request: A way to deprecate features #7130

Open
rust-lang/rfcs
#3486
@llogiq

Description

@llogiq

I have a crate that has a feature that is no longer needed. For now, I keep the feature, but it does nothing. I will at some point remove the feature, but I'd like to be able to issue a warning before removing it.

An easy an approachable way would be to nominate a special "deprecated" feature that is always available, so we could write my_feature = "deprecated"in our Cargo.toml. However, this would need a survey of crates to see if any already define such a feature.

Another option is to stabilize the proc_macro_diagnostics feature in rustc, that would allow us to issue a compile-time warning if the feature is selected, albeit with more ceremony.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-featuresArea: features — conditional compilationC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-rfcStatus: Needs an RFC to make progress.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions