diff --git a/Cargo.lock b/Cargo.lock index 6acd0e3..fa9e617 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,7 +29,7 @@ dependencies = [ [[package]] name = "error-stack-macros2" -version = "0.2.0" +version = "0.2.1" dependencies = [ "error-stack", "proc-macro2", @@ -40,7 +40,7 @@ dependencies = [ [[package]] name = "error-stack-macros2-tests" -version = "0.2.0" +version = "0.2.1" dependencies = [ "error-stack", "error-stack-macros2", diff --git a/RELEASE.md b/RELEASE.md index a9d4cf4..30c6c5e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,41 +1,19 @@ -# `error-stack-macros2` v0.2.0 +# `error-stack-macros2` v0.2.1 -We have a new development version of `error-stack-macros2`! +The second development version of `error-stack-macros2` receives its first patch! ## Fixes -This version (0.2.0) adds support for generics and external attributes to the [`impl_error_stack`](https://docs.rs/error-stack-macros2/latest/error_stack_macros2/derive.Error.html) macro. - -This means that types like this: - -```rust -use error_stack_macros2::Error; - -#[derive(Debug, Error)] -#[display("failed to retrieve credit card")] -enum CreditCardError -where - T: Display -{ - InvalidInput(T), - Other -} - -#[derive(Debug, Error)] -#[display("invalid card string")] -#[allow(non_camel_case_types)] -struct parseCardError; -``` - -...can now compile properly. +- The `#[allow(single_use_lifetimes)]` attribute included with the generated `impl` blocks is now located **above** user-provided attributes. This means that this attribute, as well as any other attributes that we might add in the future, will no longer override attributes that you specify for your type alongside the `error-stack-macros2` macro. +- The path for the generated call to the `unreachable!` macro is now fully qualified, meaning it can no longer accidentally call a different macro in scope with the same name. ## Performance -The entire source code has been refactored to eliminate unnecessary allocations, cloning, and double iterator consumptions. This should make compile times faster and reduce memory usage. +- Structs with at least one field with type _never_ (`!`) can now ignore the `display` attribute, as such a struct can never be instantiated. ## Dependencies -As promised, all dependencies have been updated to their latest versions, which in this case means performance improvements and bug fixes. +All dependencies have been updated to their latest versions, which in this case means performance improvements and bug fixes. ## Previous release notes diff --git a/SECURITY.md b/SECURITY.md index 1a06230..9ff2453 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,8 +4,8 @@ | Version | Supported | | ------- | --------- | -| 0.2.0 | ✅ | -| < 0.2.0 | ❎ | +| 0.2.1 | ✅ | +| < 0.2.1 | ❎ | ## Report a vulnerability diff --git a/impl/Cargo.toml b/impl/Cargo.toml index f77f2ae..034a330 100644 --- a/impl/Cargo.toml +++ b/impl/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "error-stack-macros2" -version = "0.2.0" +version = "0.2.1" authors = ["LuisFerLCC"] edition = "2024" -rust-version = "1.90.0" +rust-version = "1.92.0" description = "Community-made procedural macros for error-stack." readme = "../README.md" repository = "https://github.com/LuisFerLCC/error-stack-macros2" diff --git a/tests/Cargo.toml b/tests/Cargo.toml index c38222e..030df07 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "error-stack-macros2-tests" -version = "0.2.0" +version = "0.2.1" authors = ["LuisFerLCC"] edition = "2024" -rust-version = "1.90.0" +rust-version = "1.92.0" publish = false [dependencies]