1 2 3 4 5 6 7 8
use proc_macro::TokenStream; mod from; #[proc_macro_derive(From, attributes(from))] pub fn derive_from(item: TokenStream) -> TokenStream { from::derive_from(item) }