Function timrs_macro_utils::test::pretty_print
source · pub fn pretty_print(tokens: TokenStream) -> String
Expand description
Pretty prints a proc_macro2::TokenStream
to a String
.
§Examples
use proc_macro2::TokenStream;
use timrs_macro_utils::test::{build_tokens, pretty_print};
assert_eq!(
pretty_print(build_tokens("")),
""
);
§Panics
Will panic if an invalid proc_macro2::TokenStream
is provided.