From d477c09c8aec2445c68d3aa645921b3afc701cb9 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Wed, 9 Dec 2020 14:58:46 +0100 Subject: Avoid nesting Subtrees when parsing TokenStream --- crates/proc_macro_srv/src/rustc_server.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/proc_macro_srv') diff --git a/crates/proc_macro_srv/src/rustc_server.rs b/crates/proc_macro_srv/src/rustc_server.rs index c5fe3591e..503f4c101 100644 --- a/crates/proc_macro_srv/src/rustc_server.rs +++ b/crates/proc_macro_srv/src/rustc_server.rs @@ -184,8 +184,7 @@ pub mod token_stream { let (subtree, _token_map) = mbe::parse_to_token_tree(src).ok_or("Failed to parse from mbe")?; - let tt: tt::TokenTree = subtree.into(); - Ok(tt.into()) + Ok(TokenStream { subtree }) } } -- cgit v1.2.3