1
Fork 0

use CursorRef more, to not to clone Trees

This commit is contained in:
klensy 2022-05-16 18:58:15 +03:00
parent 10b3a0d209
commit cc5f3e21ac
10 changed files with 35 additions and 24 deletions

View file

@ -61,7 +61,7 @@ fn bad_path_expr_1() {
fn string_to_tts_macro() {
create_default_session_globals_then(|| {
let tts: Vec<_> =
string_to_stream("macro_rules! zip (($a)=>($a))".to_string()).trees().collect();
string_to_stream("macro_rules! zip (($a)=>($a))".to_string()).into_trees().collect();
let tts: &[TokenTree] = &tts[..];
match tts {
@ -293,7 +293,7 @@ fn ttdelim_span() {
.unwrap();
let tts: Vec<_> = match expr.kind {
ast::ExprKind::MacCall(ref mac) => mac.args.inner_tokens().trees().collect(),
ast::ExprKind::MacCall(ref mac) => mac.args.inner_tokens().into_trees().collect(),
_ => panic!("not a macro"),
};