#[macro_use] extern crate darling; #[macro_use] extern crate syn; #[macro_use] extern crate quote; use darling::FromDeriveInput; #[derive(Debug, Clone, FromMeta)] struct Wrapper(pub T); #[derive(Debug, FromDeriveInput)] #[darling(attributes(hello))] struct Foo { lorem: Wrapper, } #[test] fn expansion() { let di = parse_quote! { #[hello(lorem = "Hello")] pub struct Foo; }; Foo::::from_derive_input(&di).unwrap(); }