allow-until
Allows an item until a specified semver version, and then errors on compilation.
Or with the derive macro:
Once the CARGO_PKG_VERSION
matches the given semver predicate, the macro will cause a compilation error, therefore reminding you to update/remove the code.