From 4a2077d76d5b53e31973df0d79ffe778be7561a5 Mon Sep 17 00:00:00 2001 From: SRetip Date: Wed, 20 Mar 2024 17:34:20 +0200 Subject: [PATCH 1/2] add test case --- .../tests/inc/only_test/with_field_under_feature.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 module/core/former/tests/inc/only_test/with_field_under_feature.rs diff --git a/module/core/former/tests/inc/only_test/with_field_under_feature.rs b/module/core/former/tests/inc/only_test/with_field_under_feature.rs new file mode 100644 index 0000000000..f2def6fc85 --- /dev/null +++ b/module/core/former/tests/inc/only_test/with_field_under_feature.rs @@ -0,0 +1,8 @@ +// #[ derive( Former ) ] +// struct Foo +// { +// #[ cfg( feature = "baz" ) ] +// bar : i32, +// } + +// error => Unknown attribute #[cfg(feature = "baz")] \ No newline at end of file From 8e611a215844912f16b6e48e7233748a21b56c0d Mon Sep 17 00:00:00 2001 From: SRetip Date: Wed, 20 Mar 2024 17:36:46 +0200 Subject: [PATCH 2/2] add xxx --- .../core/former/tests/inc/only_test/with_field_under_feature.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/module/core/former/tests/inc/only_test/with_field_under_feature.rs b/module/core/former/tests/inc/only_test/with_field_under_feature.rs index f2def6fc85..2623f7579b 100644 --- a/module/core/former/tests/inc/only_test/with_field_under_feature.rs +++ b/module/core/former/tests/inc/only_test/with_field_under_feature.rs @@ -1,3 +1,4 @@ +// xxx : need to fix // #[ derive( Former ) ] // struct Foo // {