(stream: TokenStream, f: F)
| 34 | mod test; |
| 35 | |
| 36 | fn run<F>(stream: TokenStream, f: F) -> TokenStream |
| 37 | where |
| 38 | F: FnOnce(DeriveInput) -> Result<proc_macro2::TokenStream>, |
| 39 | { |
| 40 | let input = syn::parse::<DeriveInput>(stream).unwrap_or_else(|e| panic!("{e}")); |
| 41 | f(input).unwrap_or_else(|e| e.into_compile_error()).into() |
| 42 | } |
| 43 | |
| 44 | #[proc_macro_derive(ToCursors, attributes(to_cursors))] |
| 45 | pub fn derive_to_cursors(stream: TokenStream) -> TokenStream { |
no outgoing calls
no test coverage detected