From 570f3729d638f9721d518f26c7e6fa2a81fce299 Mon Sep 17 00:00:00 2001 From: Inkvisto Date: Tue, 16 Jul 2024 16:07:17 +0300 Subject: [PATCH 1/4] fix: fixed willbe tests for derive_tools_meta & macro_tools --- module/core/derive_tools_meta/src/lib.rs | 2 ++ module/core/macro_tools/Cargo.toml | 1 + 2 files changed, 3 insertions(+) diff --git a/module/core/derive_tools_meta/src/lib.rs b/module/core/derive_tools_meta/src/lib.rs index 798ee1c2bd..c56791014e 100644 --- a/module/core/derive_tools_meta/src/lib.rs +++ b/module/core/derive_tools_meta/src/lib.rs @@ -16,6 +16,7 @@ feature = "derive_index", feature = "derive_index_mut", feature = "derive_inner_from", + feature = "derive_new", feature = "derive_variadic_from", feature = "derive_phantom" ) @@ -34,6 +35,7 @@ mod derive; // feature = "derive_index", // feature = "derive_index_mut", // feature = "derive_inner_from", +// feature = "derive_new", // feature = "derive_variadic_from", // feature = "derive_phantom" // ) diff --git a/module/core/macro_tools/Cargo.toml b/module/core/macro_tools/Cargo.toml index bb96ca0fab..cf5fa24570 100644 --- a/module/core/macro_tools/Cargo.toml +++ b/module/core/macro_tools/Cargo.toml @@ -55,6 +55,7 @@ full = [ ] enabled = [ + "default", "former_types/enabled", "interval_adapter/enabled", "clone_dyn_types/enabled", From bdb379745e6301e3cde7afca7fc120397ca3a1c8 Mon Sep 17 00:00:00 2001 From: Inkvisto Date: Wed, 17 Jul 2024 13:56:53 +0300 Subject: [PATCH 2/4] fix: macro_tools warnings fixes --- module/core/macro_tools/examples/macro_tools_attr_prop.rs | 4 ++-- module/core/macro_tools/examples/macro_tools_trivial.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/core/macro_tools/examples/macro_tools_attr_prop.rs b/module/core/macro_tools/examples/macro_tools_attr_prop.rs index 3c18928fd1..b5369750d5 100644 --- a/module/core/macro_tools/examples/macro_tools_attr_prop.rs +++ b/module/core/macro_tools/examples/macro_tools_attr_prop.rs @@ -26,9 +26,9 @@ //! defined in other crates. //! -#[ cfg( not( all( feature = "enabled", debug_assertions ) ) ) ] +#[ cfg( not( all( feature = "enabled", feature = "attr_prop", debug_assertions ) ) ) ] fn main(){} -#[ cfg( all( feature = "enabled", debug_assertions ) ) ] +#[ cfg( all( feature = "enabled", feature = "attr_prop", debug_assertions ) ) ] fn main() { diff --git a/module/core/macro_tools/examples/macro_tools_trivial.rs b/module/core/macro_tools/examples/macro_tools_trivial.rs index e92559b193..c0a1e27982 100644 --- a/module/core/macro_tools/examples/macro_tools_trivial.rs +++ b/module/core/macro_tools/examples/macro_tools_trivial.rs @@ -6,9 +6,9 @@ //! In this example, we generate a type `core::option::Option` and extract its type parameters. //! -#[ cfg( not( feature = "enabled" ) ) ] +#[ cfg( not( all( feature = "enabled", feature = "typ" ) ) ) ] fn main(){} -#[ cfg( feature = "enabled" ) ] +#[ cfg( all( feature = "enabled", feature = "typ" ) ) ] fn main() { // Import necessary macros and modules from the `macro_tools` crate. From 4f0555c95030f36f37be07a7e2c89057e04dd3c1 Mon Sep 17 00:00:00 2001 From: Inkvisto Date: Wed, 17 Jul 2024 13:59:55 +0300 Subject: [PATCH 3/4] ref: removed incorrect fixes, fix: tests and readme --- module/core/macro_tools/Readme.md | 8 ++++---- module/core/macro_tools/tests/inc/mod.rs | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/module/core/macro_tools/Readme.md b/module/core/macro_tools/Readme.md index 1121555152..6d148200b3 100644 --- a/module/core/macro_tools/Readme.md +++ b/module/core/macro_tools/Readme.md @@ -15,9 +15,9 @@ The purpose of `typ::type_parameters` is to extract type parameters from a given In this example, we generate a type `core::option::Option` and extract its type parameters. ```rust -#[ cfg( not( feature = "enabled" ) ) ] +#[ cfg( not( all( feature = "enabled", feature = "typ" ) ) ) ] fn main(){} -#[ cfg( feature = "enabled" ) ] +#[ cfg( all( feature = "enabled", feature = "typ" ) ) ] fn main() { // Import necessary macros and modules from the `macro_tools` crate. @@ -80,9 +80,9 @@ defined in other crates. ```rust -#[ cfg( not( all( feature = "enabled", debug_assertions ) ) ) ] +#[ cfg( not( all( feature = "enabled", feature = "attr_prop", debug_assertions ) ) ) ] fn main(){} -#[ cfg( all( feature = "enabled", debug_assertions ) ) ] +#[ cfg( all( feature = "enabled", feature = "attr_prop", debug_assertions ) ) ] fn main() { diff --git a/module/core/macro_tools/tests/inc/mod.rs b/module/core/macro_tools/tests/inc/mod.rs index 198ab61378..c28692fdf0 100644 --- a/module/core/macro_tools/tests/inc/mod.rs +++ b/module/core/macro_tools/tests/inc/mod.rs @@ -12,23 +12,39 @@ mod if_enabled use super::*; + #[ cfg( feature = "attr" ) ] mod attr_test; + #[ cfg( feature = "attr_prop" ) ] mod attr_prop_test; mod basic_test; + #[ cfg( feature = "ct" ) ] mod compile_time_test; + #[ cfg( feature = "container_kind" ) ] mod container_kind_test; + #[ cfg( feature = "derive" ) ] mod derive_test; + #[ cfg( feature = "diag" ) ] mod diag_test; mod drop_test; + #[ cfg( feature = "equation" ) ] mod equation_test; + #[ cfg( feature = "generic_args" ) ] mod generic_args_test; + #[ cfg( feature = "generic_params" ) ] mod generic_params_test; + #[ cfg( feature = "item" ) ] mod item_test; + #[ cfg( feature = "item_struct" ) ] mod item_struct_test; + #[ cfg( feature = "phantom" ) ] mod phantom_test; + #[ cfg( feature = "quantifier" ) ] mod quantifier_test; + #[ cfg( feature = "struct_like" ) ] mod struct_like_test; + #[ cfg( feature = "tokens" ) ] mod tokens_test; + #[ cfg( feature = "typ" ) ] mod typ_test; } From c237e82f21be8f287f4e2cc3f217d3267c9c4e4e Mon Sep 17 00:00:00 2001 From: Inkvisto Date: Wed, 17 Jul 2024 14:01:20 +0300 Subject: [PATCH 4/4] ref: delete default from Cargo.toml --- module/core/macro_tools/Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/module/core/macro_tools/Cargo.toml b/module/core/macro_tools/Cargo.toml index cf5fa24570..bb96ca0fab 100644 --- a/module/core/macro_tools/Cargo.toml +++ b/module/core/macro_tools/Cargo.toml @@ -55,7 +55,6 @@ full = [ ] enabled = [ - "default", "former_types/enabled", "interval_adapter/enabled", "clone_dyn_types/enabled",