What it does
Requires the since field to be present in #[deprecated] attributes
Advantage
Enforce consistency and more documentation for projects which want to always specify which versions an item was deprecated in.
Drawbacks
No response
Example
#[deprecated]
fn foo() {}
Would be warned, should be:
#[deprecated(since="54.0.0")]
Comparison with existing lints
There is deprecated_semver but that only checks the since field is valid if present
Additional Context
Related issue:
We could also have lint for missing message/note?
What it does
Requires the
sincefield to be present in#[deprecated]attributesAdvantage
Enforce consistency and more documentation for projects which want to always specify which versions an item was deprecated in.
Drawbacks
No response
Example
Would be warned, should be:
#[deprecated(since="54.0.0")]Comparison with existing lints
There is
deprecated_semverbut that only checks thesincefield is valid if presentAdditional Context
Related issue:
We could also have lint for missing message/note?