Function timrs_macro_utils::test::build_tokens

source ·
pub fn build_tokens(input: &str) -> TokenStream
Expand description

Converts a String into a proc_macro2::TokenStream.

§Examples

use core::str::FromStr;
use timrs_macro_utils::test::build_tokens;

assert_eq!(
    build_tokens("a").to_string(),
    "a"
);

§Panics

Will panic if the provided input can’t be converted into a valid proc_macro2::TokenStream.