#[macro_use] extern crate darling; extern crate syn; use std::ops::Add; #[derive(Debug, Clone, FromMeta)] #[darling(bound = "T: FromMeta + Add")] struct Wrapper(pub T); impl Add for Wrapper { type Output = Wrapper<::Output>; fn add(self, rhs: Self) -> Wrapper<::Output> { Wrapper(self.0 + rhs.0) } } #[derive(Debug, FromDeriveInput)] #[darling(attributes(hello), bound = "Wrapper: Add, T: FromMeta")] struct Foo { lorem: Wrapper, } #[test] fn expansion() {}