I have a crate that up to now had a feature that will no longer be needed. I'd like to deprecate it, but have no idea how.
My plan so far is to make it a default feature first, but then what?
I have a crate that up to now had a feature that will no longer be needed. I'd like to deprecate it, but have no idea how.
My plan so far is to make it a default feature first, but then what?
You can put this on functions that previously depended on this feature:
#[cfg_attr(feature = "unwanted", deprecated(note = "don't use the feature"))]
This will show a warning only if that feature has been enabled. However, the warning will be slightly misleading, as it will point to the function.
When you completely remove the feature, you should increase the major version.
© 2022 - 2024 — McMap. All rights reserved.