This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use proc_macro::TokenStream; | |
use quote::quote; | |
use syn::{parse_macro_input, DeriveInput}; | |
#[proc_macro_derive(DisplayUsingDebug)] | |
pub fn derive_display_using_debug(input: TokenStream) -> TokenStream { | |
let ast = parse_macro_input!(input as DeriveInput); | |
let name = ast.ident; | |
TokenStream::from(quote! { |