//! Check for the correct processing of `ExprGroup`s in types //! //! They occur when the types is passed in as a `macro_rules` argument like here. //! macro_rules! t { ($($param:ident : $ty:ty),*) => { #[derive(Default)] #[serde_with_macros::apply( crate = "serde_with_macros", Option => #[serde(skip_serializing_if = "Option::is_none")], )] #[derive(serde::Serialize)] struct Data { a: Option, b: Option, c: Option, $(pub $param: $ty),* } } } t!(d: Option); #[test] fn t() { let expected = r#"{}"#; let data = Data::default(); assert_eq!(expected, serde_json::to_string(&data).unwrap()); }