diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-09 13:59:39 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-09 13:59:39 +0000 |
commit | 42be522c80cf0cc2d49b60f3c1d66afdc51fcbbb (patch) | |
tree | 1b23eadbf3f271edb8e5a14d152f0c9ea46b3e79 /crates | |
parent | ef989880fff36f10b7e166647497779bacc1c47f (diff) | |
parent | d477c09c8aec2445c68d3aa645921b3afc701cb9 (diff) |
Merge #6783
6783: Avoid nesting Subtrees when parsing TokenStream r=jonas-schievink a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6744
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates')
-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 | ||