aboutsummaryrefslogtreecommitdiff
path: root/mingling_pathf/test/src/test_files
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-06-30 05:56:05 +0800
committer魏曹先生 <1992414357@qq.com>2026-06-30 05:56:05 +0800
commit3888feded3cb83865d6161de642a1a298a7a5835 (patch)
tree9d4d29eddc13b350945c1ed35f3937a744b30349 /mingling_pathf/test/src/test_files
parent9dab47f47da4d6ae9333617d7ea6cbc077efdc67 (diff)
fix: parse grouped derive attributes for enums and unions correctly
Use `parse_args_with` with `Punctuated<Path, Comma>` to correctly identify `Groupped` and `GrouppedSerialize` derive macros, fixing a bug where enums and unions were not properly detected
Diffstat (limited to 'mingling_pathf/test/src/test_files')
-rw-r--r--mingling_pathf/test/src/test_files/test_groupped_derive.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/mingling_pathf/test/src/test_files/test_groupped_derive.rs b/mingling_pathf/test/src/test_files/test_groupped_derive.rs
index f6c6fa9..913587c 100644
--- a/mingling_pathf/test/src/test_files/test_groupped_derive.rs
+++ b/mingling_pathf/test/src/test_files/test_groupped_derive.rs
@@ -13,6 +13,18 @@ struct Derived3 {
value: bool,
}
+#[derive(Groupped)]
+enum EnumDerived1 {
+ A,
+ B,
+}
+
+#[derive(GrouppedSerialize)]
+enum EnumDerived2 {
+ X(String),
+ Y(i32),
+}
+
pub mod sub {
#[derive(Groupped)]
struct Derived1 {
@@ -23,4 +35,9 @@ pub mod sub {
struct Derived3 {
value: bool,
}
+
+ #[derive(Groupped)]
+ enum EnumDerived1 {
+ A,
+ }
}