From 0e51ff17445bc9fe7370587769dff0d8606fbc15 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Sun, 26 Oct 2025 09:24:15 +0000 Subject: [PATCH 1/3] Release v0.6.0-beta --- CHANGELOG.md | 6 ++++ Cargo.lock | 46 +++++++++++++-------------- Cargo.toml | 38 +++++++++++----------- crates/cgp-async-macro/Cargo.toml | 2 +- crates/cgp-component/Cargo.toml | 2 +- crates/cgp-core/Cargo.toml | 2 +- crates/cgp-dispatch/Cargo.toml | 2 +- crates/cgp-error-anyhow/Cargo.toml | 2 +- crates/cgp-error-extra/Cargo.toml | 2 +- crates/cgp-error-eyre/Cargo.toml | 2 +- crates/cgp-error-std/Cargo.toml | 2 +- crates/cgp-error/Cargo.toml | 2 +- crates/cgp-extra-macro-lib/Cargo.toml | 2 +- crates/cgp-extra-macro/Cargo.toml | 2 +- crates/cgp-extra/Cargo.toml | 2 +- crates/cgp-field-extra/Cargo.toml | 2 +- crates/cgp-field/Cargo.toml | 2 +- crates/cgp-handler/Cargo.toml | 2 +- crates/cgp-macro-lib/Cargo.toml | 2 +- crates/cgp-macro/Cargo.toml | 2 +- crates/cgp-monad/Cargo.toml | 2 +- crates/cgp-run/Cargo.toml | 2 +- crates/cgp-runtime/Cargo.toml | 2 +- crates/cgp-tests/Cargo.toml | 2 +- crates/cgp-type/Cargo.toml | 2 +- crates/cgp/Cargo.toml | 2 +- 26 files changed, 71 insertions(+), 65 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 631ace0c..d55dbb0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v0.6.0 (2025-10-26) + +- Introduce `#[cgp_impl]` to simplify provider trait implementation - [#174](https://github.com/contextgeneric/cgp/pull/174) +- Allow context types to delegate components directly - [#175](https://github.com/contextgeneric/cgp/pull/175) +- Introduce `#[cgp_inherit]` for inheriting from presets - [#176](https://github.com/contextgeneric/cgp/pull/176) + ## v0.5.0 (2025-10-11) - Monadic computation support diff --git a/Cargo.lock b/Cargo.lock index d99f9db2..19e6cde7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,7 +10,7 @@ checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "cgp" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-core", "cgp-extra", @@ -18,7 +18,7 @@ dependencies = [ [[package]] name = "cgp-async-macro" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "proc-macro2", "quote", @@ -27,11 +27,11 @@ dependencies = [ [[package]] name = "cgp-component" -version = "0.5.0" +version = "0.6.0-beta" [[package]] name = "cgp-core" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-async-macro", "cgp-component", @@ -43,7 +43,7 @@ dependencies = [ [[package]] name = "cgp-dispatch" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-core", "cgp-handler", @@ -52,7 +52,7 @@ dependencies = [ [[package]] name = "cgp-error" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-component", "cgp-macro", @@ -61,7 +61,7 @@ dependencies = [ [[package]] name = "cgp-error-anyhow" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "anyhow", "cgp-core", @@ -69,14 +69,14 @@ dependencies = [ [[package]] name = "cgp-error-extra" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-core", ] [[package]] name = "cgp-error-eyre" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-core", "eyre", @@ -84,14 +84,14 @@ dependencies = [ [[package]] name = "cgp-error-std" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-core", ] [[package]] name = "cgp-extra" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-core", "cgp-dispatch", @@ -106,7 +106,7 @@ dependencies = [ [[package]] name = "cgp-extra-macro" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-extra-macro-lib", "syn", @@ -114,7 +114,7 @@ dependencies = [ [[package]] name = "cgp-extra-macro-lib" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "proc-macro2", "quote", @@ -123,7 +123,7 @@ dependencies = [ [[package]] name = "cgp-field" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-component", "cgp-type", @@ -131,21 +131,21 @@ dependencies = [ [[package]] name = "cgp-field-extra" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-field", ] [[package]] name = "cgp-handler" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-core", ] [[package]] name = "cgp-macro" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-macro-lib", "syn", @@ -153,7 +153,7 @@ dependencies = [ [[package]] name = "cgp-macro-lib" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "itertools", "prettyplease", @@ -164,7 +164,7 @@ dependencies = [ [[package]] name = "cgp-monad" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-core", "cgp-handler", @@ -172,21 +172,21 @@ dependencies = [ [[package]] name = "cgp-run" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-core", ] [[package]] name = "cgp-runtime" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-core", ] [[package]] name = "cgp-tests" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp", "const_format", @@ -195,7 +195,7 @@ dependencies = [ [[package]] name = "cgp-type" -version = "0.5.0" +version = "0.6.0-beta" dependencies = [ "cgp-component", "cgp-macro", diff --git a/Cargo.toml b/Cargo.toml index c5efab45..aa9709f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,22 +37,22 @@ authors = ["Soares Chen "] keywords = ["cgp"] [workspace.dependencies] -cgp = { version = "0.5.0", path = "./crates/cgp" } -cgp-core = { version = "0.5.0", path = "./crates/cgp-core" } -cgp-extra = { version = "0.5.0", path = "./crates/cgp-extra" } -cgp-async-macro = { version = "0.5.0", path = "./crates/cgp-async-macro" } -cgp-component = { version = "0.5.0", path = "./crates/cgp-component" } -cgp-macro = { version = "0.5.0", path = "./crates/cgp-macro" } -cgp-macro-lib = { version = "0.5.0", path = "./crates/cgp-macro-lib" } -cgp-type = { version = "0.5.0", path = "./crates/cgp-type" } -cgp-field = { version = "0.5.0", path = "./crates/cgp-field" } -cgp-field-extra = { version = "0.5.0", path = "./crates/cgp-field-extra" } -cgp-error = { version = "0.5.0", path = "./crates/cgp-error" } -cgp-error-extra = { version = "0.5.0", path = "./crates/cgp-error-extra" } -cgp-extra-macro = { version = "0.5.0", path = "./crates/cgp-extra-macro" } -cgp-extra-macro-lib = { version = "0.5.0", path = "./crates/cgp-extra-macro-lib" } -cgp-handler = { version = "0.5.0", path = "./crates/cgp-handler" } -cgp-monad = { version = "0.5.0", path = "./crates/cgp-monad" } -cgp-dispatch = { version = "0.5.0", path = "./crates/cgp-dispatch" } -cgp-run = { version = "0.5.0", path = "./crates/cgp-run" } -cgp-runtime = { version = "0.5.0", path = "./crates/cgp-runtime" } +cgp = { version = "0.6.0-beta", path = "./crates/cgp" } +cgp-core = { version = "0.6.0-beta", path = "./crates/cgp-core" } +cgp-extra = { version = "0.6.0-beta", path = "./crates/cgp-extra" } +cgp-async-macro = { version = "0.6.0-beta", path = "./crates/cgp-async-macro" } +cgp-component = { version = "0.6.0-beta", path = "./crates/cgp-component" } +cgp-macro = { version = "0.6.0-beta", path = "./crates/cgp-macro" } +cgp-macro-lib = { version = "0.6.0-beta", path = "./crates/cgp-macro-lib" } +cgp-type = { version = "0.6.0-beta", path = "./crates/cgp-type" } +cgp-field = { version = "0.6.0-beta", path = "./crates/cgp-field" } +cgp-field-extra = { version = "0.6.0-beta", path = "./crates/cgp-field-extra" } +cgp-error = { version = "0.6.0-beta", path = "./crates/cgp-error" } +cgp-error-extra = { version = "0.6.0-beta", path = "./crates/cgp-error-extra" } +cgp-extra-macro = { version = "0.6.0-beta", path = "./crates/cgp-extra-macro" } +cgp-extra-macro-lib = { version = "0.6.0-beta", path = "./crates/cgp-extra-macro-lib" } +cgp-handler = { version = "0.6.0-beta", path = "./crates/cgp-handler" } +cgp-monad = { version = "0.6.0-beta", path = "./crates/cgp-monad" } +cgp-dispatch = { version = "0.6.0-beta", path = "./crates/cgp-dispatch" } +cgp-run = { version = "0.6.0-beta", path = "./crates/cgp-run" } +cgp-runtime = { version = "0.6.0-beta", path = "./crates/cgp-runtime" } diff --git a/crates/cgp-async-macro/Cargo.toml b/crates/cgp-async-macro/Cargo.toml index 2b70579c..98b551d9 100644 --- a/crates/cgp-async-macro/Cargo.toml +++ b/crates/cgp-async-macro/Cargo.toml @@ -5,7 +5,7 @@ license = { workspace = true } repository = { workspace = true } authors = { workspace = true } rust-version = { workspace = true } -version = "0.5.0" +version = "0.6.0-beta" keywords = { workspace = true } description = """ Context-generic programming async macros diff --git a/crates/cgp-component/Cargo.toml b/crates/cgp-component/Cargo.toml index bb3c3922..81c95bdc 100644 --- a/crates/cgp-component/Cargo.toml +++ b/crates/cgp-component/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-component" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-core/Cargo.toml b/crates/cgp-core/Cargo.toml index 36dd76d6..ee1fc631 100644 --- a/crates/cgp-core/Cargo.toml +++ b/crates/cgp-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-core" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-dispatch/Cargo.toml b/crates/cgp-dispatch/Cargo.toml index 96135958..cef800cd 100644 --- a/crates/cgp-dispatch/Cargo.toml +++ b/crates/cgp-dispatch/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-dispatch" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-error-anyhow/Cargo.toml b/crates/cgp-error-anyhow/Cargo.toml index 1e7094ea..628ed48e 100644 --- a/crates/cgp-error-anyhow/Cargo.toml +++ b/crates/cgp-error-anyhow/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-error-anyhow" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-error-extra/Cargo.toml b/crates/cgp-error-extra/Cargo.toml index 98110961..2b9f938a 100644 --- a/crates/cgp-error-extra/Cargo.toml +++ b/crates/cgp-error-extra/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-error-extra" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-error-eyre/Cargo.toml b/crates/cgp-error-eyre/Cargo.toml index 4b6012d5..4fdb375a 100644 --- a/crates/cgp-error-eyre/Cargo.toml +++ b/crates/cgp-error-eyre/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-error-eyre" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-error-std/Cargo.toml b/crates/cgp-error-std/Cargo.toml index d2e86a71..87fc1f40 100644 --- a/crates/cgp-error-std/Cargo.toml +++ b/crates/cgp-error-std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-error-std" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-error/Cargo.toml b/crates/cgp-error/Cargo.toml index 7d40d9f6..e1ee95e4 100644 --- a/crates/cgp-error/Cargo.toml +++ b/crates/cgp-error/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-error" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-extra-macro-lib/Cargo.toml b/crates/cgp-extra-macro-lib/Cargo.toml index adfa363b..b6f08d13 100644 --- a/crates/cgp-extra-macro-lib/Cargo.toml +++ b/crates/cgp-extra-macro-lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-extra-macro-lib" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-extra-macro/Cargo.toml b/crates/cgp-extra-macro/Cargo.toml index b855659a..a3df7f7a 100644 --- a/crates/cgp-extra-macro/Cargo.toml +++ b/crates/cgp-extra-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-extra-macro" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-extra/Cargo.toml b/crates/cgp-extra/Cargo.toml index 3d538a4e..92f78e81 100644 --- a/crates/cgp-extra/Cargo.toml +++ b/crates/cgp-extra/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-extra" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-field-extra/Cargo.toml b/crates/cgp-field-extra/Cargo.toml index 5c84eaee..4e9583f6 100644 --- a/crates/cgp-field-extra/Cargo.toml +++ b/crates/cgp-field-extra/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-field-extra" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-field/Cargo.toml b/crates/cgp-field/Cargo.toml index 13b4e425..4b8d481c 100644 --- a/crates/cgp-field/Cargo.toml +++ b/crates/cgp-field/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-field" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-handler/Cargo.toml b/crates/cgp-handler/Cargo.toml index a59dd10f..bcee2a6c 100644 --- a/crates/cgp-handler/Cargo.toml +++ b/crates/cgp-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-handler" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-macro-lib/Cargo.toml b/crates/cgp-macro-lib/Cargo.toml index 774d0be9..286799fc 100644 --- a/crates/cgp-macro-lib/Cargo.toml +++ b/crates/cgp-macro-lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-macro-lib" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-macro/Cargo.toml b/crates/cgp-macro/Cargo.toml index d69a7160..b7784a91 100644 --- a/crates/cgp-macro/Cargo.toml +++ b/crates/cgp-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-macro" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-monad/Cargo.toml b/crates/cgp-monad/Cargo.toml index c2ee81ec..59c93033 100644 --- a/crates/cgp-monad/Cargo.toml +++ b/crates/cgp-monad/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-monad" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-run/Cargo.toml b/crates/cgp-run/Cargo.toml index 2305b4a9..fdcec31b 100644 --- a/crates/cgp-run/Cargo.toml +++ b/crates/cgp-run/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-run" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-runtime/Cargo.toml b/crates/cgp-runtime/Cargo.toml index e48a9900..d1cfeeb6 100644 --- a/crates/cgp-runtime/Cargo.toml +++ b/crates/cgp-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-runtime" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-tests/Cargo.toml b/crates/cgp-tests/Cargo.toml index 3a39acd4..a641cfbb 100644 --- a/crates/cgp-tests/Cargo.toml +++ b/crates/cgp-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-tests" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp-type/Cargo.toml b/crates/cgp-type/Cargo.toml index 048283df..69c174a1 100644 --- a/crates/cgp-type/Cargo.toml +++ b/crates/cgp-type/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp-type" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } diff --git a/crates/cgp/Cargo.toml b/crates/cgp/Cargo.toml index e1201413..2f4d2d7a 100644 --- a/crates/cgp/Cargo.toml +++ b/crates/cgp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cgp" -version = "0.5.0" +version = "0.6.0-beta" edition = { workspace = true } license = { workspace = true } repository = { workspace = true } From 549eeff42b0751289dea8d5f29df33df0cfe5846 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Sun, 26 Oct 2025 09:35:16 +0000 Subject: [PATCH 2/3] Add documentation for #[cgp_impl] --- crates/cgp-field/src/traits/transform_map.rs | 2 +- crates/cgp-macro/src/lib.rs | 62 +++++++++++++++++++- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/crates/cgp-field/src/traits/transform_map.rs b/crates/cgp-field/src/traits/transform_map.rs index 9f100c16..8f4013bf 100644 --- a/crates/cgp-field/src/traits/transform_map.rs +++ b/crates/cgp-field/src/traits/transform_map.rs @@ -4,7 +4,7 @@ use crate::impls::IsNothing; use crate::traits::{HasFields, MapType, PartialData, UpdateField}; use crate::types::{Cons, Field, Nil}; -/// Natural transformation from M1::Map to M2::Map +/// Natural transformation from `M1::Map` to `M2::Map` pub trait TransformMap { fn transform_mapped(value: M1::Map) -> M2::Map; } diff --git a/crates/cgp-macro/src/lib.rs b/crates/cgp-macro/src/lib.rs index dc5be0ed..5d46694d 100644 --- a/crates/cgp-macro/src/lib.rs +++ b/crates/cgp-macro/src/lib.rs @@ -73,7 +73,7 @@ pub fn cgp_component(attr: TokenStream, item: TokenStream) -> TokenStream { } /** - `#[cgp_provider]` is used when implementing a provider trait. + `#[cgp_provider]` is used for implementing a provider trait. It is applied on a provider trait `impl` block, and generates the accompanying `IsProviderFor` trait implementation that captures the same constraints as @@ -135,6 +135,7 @@ pub fn cgp_component(attr: TokenStream, item: TokenStream) -> TokenStream { where Context: HasName, {} + ``` */ #[proc_macro_attribute] pub fn cgp_provider(attr: TokenStream, item: TokenStream) -> TokenStream { @@ -143,6 +144,65 @@ pub fn cgp_provider(attr: TokenStream, item: TokenStream) -> TokenStream { .into() } +/** + `#[cgp_impl]` provides a simplified ergonomic implementing a provider trait, + by making it look like we are writing blanket implementations on a generic context. + + The macro accepts a provider type in its attribute argument, along with an optional `new` + keyword at the front. If `new` is specified, a provider struct is defined along with + the trait impl. + + The macro can be applied with a trait `impl` body, where the provider trait is implemented + as if it has the same trait signature as the consumer trait. Behind the scene, it moves + the `Self` type in the trait impl to the first position of the generic parameter + in the trait path, and use the given provider type as the new `Self` type. + + The macro also replaces all references to `Self` and `self` in the trait body to explicitly + refer to the original context type. + + After the transformation of the trait `impl`, `#[cgp_impl]` works the same way as + [`#[cgp_provider]`](cgp_provider), and also generates the corresponding `IsProviderFor` + implementation for the provider. + + ## Example + + Given the following provider trait implementation: + + ```rust,ignore + #[cgp_impl(GreetName)] + impl Greeter for Context + where + Context: HasName, + { + fn greet(context: &Context) { + println!("Hello, {}!", context.name()); + } + } + ``` + + would be equivalent to the following provider implementation using `#[cgp_provider]`: + + ```rust,ignore + #[cgp_provider] + impl Greeter for GreetName + where + Context: HasName, + { + fn greet(context: &Context) { + println!("Hello, {}!", context.name()); + } + } + ``` + + Which would generate the following `IsProviderFor` trait implementation: + + ```rust,ignore + impl IsProviderFor for GreetName + where + Context: HasName, + {} + ``` +*/ #[proc_macro_attribute] pub fn cgp_impl(attr: TokenStream, item: TokenStream) -> TokenStream { cgp_macro_lib::cgp_impl(attr.into(), item.into()) From 29e60c876cc7dc53d50d457001ff8f858942cea4 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Sun, 26 Oct 2025 10:05:45 +0000 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d55dbb0c..38c92ca5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Introduce `#[cgp_impl]` to simplify provider trait implementation - [#174](https://github.com/contextgeneric/cgp/pull/174) - Allow context types to delegate components directly - [#175](https://github.com/contextgeneric/cgp/pull/175) - Introduce `#[cgp_inherit]` for inheriting from presets - [#176](https://github.com/contextgeneric/cgp/pull/176) +- Fix use of self inside default trait method implementation body - [#179](https://github.com/contextgeneric/cgp/pull/179) ## v0.5.0 (2025-10-11)