diff options
author | Jonas Schievink <[email protected]> | 2020-12-09 13:58:46 +0000 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-12-09 13:58:46 +0000 |
commit | d477c09c8aec2445c68d3aa645921b3afc701cb9 (patch) | |
tree | 1b23eadbf3f271edb8e5a14d152f0c9ea46b3e79 /crates/proc_macro_srv/src | |
parent | ef989880fff36f10b7e166647497779bacc1c47f (diff) |
Avoid nesting Subtrees when parsing TokenStream
Diffstat (limited to 'crates/proc_macro_srv/src')
-rw-r--r-- | crates/proc_macro_srv/src/rustc_server.rs | 3 |
1 files changed, 1 insertions, 2 deletions
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 { | |||
184 | let (subtree, _token_map) = | 184 | let (subtree, _token_map) = |
185 | mbe::parse_to_token_tree(src).ok_or("Failed to parse from mbe")?; | 185 | mbe::parse_to_token_tree(src).ok_or("Failed to parse from mbe")?; |
186 | 186 | ||
187 | let tt: tt::TokenTree = subtree.into(); | 187 | Ok(TokenStream { subtree }) |
188 | Ok(tt.into()) | ||
189 | } | 188 | } |
190 | } | 189 | } |
191 | 190 | ||