Replace into_trees with trees in a test.

There's no need for token tree cloning here.
This commit is contained in:
Nicholas Nethercote 2023-07-27 10:40:39 +10:00
parent 53379a7b65
commit a9d8459299

View File

@ -63,9 +63,8 @@ fn bad_path_expr_1() {
#[test]
fn string_to_tts_macro() {
create_default_session_globals_then(|| {
let tts: Vec<_> =
string_to_stream("macro_rules! zip (($a)=>($a))".to_string()).into_trees().collect();
let tts: &[TokenTree] = &tts[..];
let stream = string_to_stream("macro_rules! zip (($a)=>($a))".to_string());
let tts = &stream.trees().collect::<Vec<_>>()[..];
match tts {
[