Can I roundtrip through these two functions freely? If not, what is lost/breaks/changes?
fn identity<T: quote::ToTokens + syn::parse::Parse>(i: T) -> T {
let x: proc_macro::TokenStream = quote!(#i).into();
syn::parse(x).unwrap()
}
Can I roundtrip through these two functions freely? If not, what is lost/breaks/changes?
fn identity<T: quote::ToTokens + syn::parse::Parse>(i: T) -> T {
let x: proc_macro::TokenStream = quote!(#i).into();
syn::parse(x).unwrap()
}
Copyright © 2021 Jogjafile Inc.