allow-until

Crates.ioallow-until
lib.rsallow-until
version0.2.0
sourcesrc
created_at2023-08-23 21:51:47.73626
updated_at2023-08-25 11:04:40.214816
descriptionAllows an item until a specified semver version, and then errors on compilation.
homepage
repositoryhttps://github.com/DexterHill0/allow-until
max_upload_size
id952764
size10,715
Dexter Hill (DexterHill0)

documentation

README

allow-until

Allows an item until a specified semver version, and then errors on compilation.

githubcrates-iodocs-rs

#[allow_until(version = ">= 1.0.x", reason = "struct is deprecated from version 1.0.x onwards")]
struct MyStruct {
    //....
}

Or with the derive macro:

#[derive(AllowUntil)]
struct MyStruct {
    #[allow_until(version = ">= 1.0.x", reason = "member is deprecated from version 1.0.x onwards")]
    foo: usize
}

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.

Commit count: 7

cargo fmt