File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
crates/ra_proc_macro_srv/src Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,16 @@ impl Extend<TokenTree> for TokenStream {
7676impl Extend < TokenStream > for TokenStream {
7777 fn extend < I : IntoIterator < Item = TokenStream > > ( & mut self , streams : I ) {
7878 for item in streams {
79- self . subtree . token_trees . extend ( & mut item. into_iter ( ) )
79+ for tkn in item {
80+ match tkn {
81+ tt:: TokenTree :: Subtree ( subtree) if subtree. delimiter . is_none ( ) => {
82+ self . subtree . token_trees . extend ( subtree. token_trees ) ;
83+ }
84+ _ => {
85+ self . subtree . token_trees . push ( tkn) ;
86+ }
87+ }
88+ }
8089 }
8190 }
8291}
Original file line number Diff line number Diff line change @@ -25,8 +25,7 @@ SUBTREE $
2525 SUBTREE () 4294967295
2626 IDENT feature 4294967295
2727 PUNCH = [alone] 4294967295
28- SUBTREE $
29- LITERAL "cargo-clippy" 0
28+ LITERAL "cargo-clippy" 0
3029 PUNCH , [alone] 4294967295
3130 IDENT allow 4294967295
3231 SUBTREE () 4294967295
You can’t perform that action at this time.
0 commit comments