diff options
Diffstat (limited to 'third_party/rust/darling/tests/enums_struct.rs')
-rw-r--r-- | third_party/rust/darling/tests/enums_struct.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/third_party/rust/darling/tests/enums_struct.rs b/third_party/rust/darling/tests/enums_struct.rs new file mode 100644 index 0000000000..cae4cd5cdc --- /dev/null +++ b/third_party/rust/darling/tests/enums_struct.rs @@ -0,0 +1,15 @@ +#![allow(dead_code)] + +//! Test expansion of enums which have struct variants. + +use darling::FromMeta; +#[derive(Debug, FromMeta)] +#[darling(rename_all = "snake_case")] +enum Message { + Hello { user: String, silent: bool }, + Ping, + Goodbye { user: String }, +} + +#[test] +fn expansion() {} |