Feature Request: A way to deprecate features #7130
Labels
A-features
Area: features — conditional compilation
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-needs-rfc
Status: Needs an RFC to make progress.
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 ourCargo.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.The text was updated successfully, but these errors were encountered: