diff --git a/src/lib.rs b/src/lib.rs index 0cb67a9..6345fcb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -505,17 +505,14 @@ mod tests { use super::*; fn parse_to_tokens(p: &'static str) { - let tokens = p - .parse::() - .expect("string could not be parsed as tokens") - .to_string(); + let tokens: TokenStream2 = p.parse().expect("string could not be parsed as tokens"); - let parsed = syn::parse_str::

(&tokens) + let parsed = syn::parse_str::

(&p) .expect("tokens could not be parsed as type") .into_token_stream() .to_string(); - assert_eq!(parsed, tokens); + assert_eq!(parsed, tokens.to_string()); } #[test]