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 {
76
76
impl Extend < TokenStream > for TokenStream {
77
77
fn extend < I : IntoIterator < Item = TokenStream > > ( & mut self , streams : I ) {
78
78
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
+ }
80
89
}
81
90
}
82
91
}
Original file line number Diff line number Diff line change @@ -25,8 +25,7 @@ SUBTREE $
25
25
SUBTREE () 4294967295
26
26
IDENT feature 4294967295
27
27
PUNCH = [alone] 4294967295
28
- SUBTREE $
29
- LITERAL "cargo-clippy" 0
28
+ LITERAL "cargo-clippy" 0
30
29
PUNCH , [alone] 4294967295
31
30
IDENT allow 4294967295
32
31
SUBTREE () 4294967295
You can’t perform that action at this time.
0 commit comments