diff options
Diffstat (limited to 'crates/ra_mbe/src/mbe_expander.rs')
-rw-r--r-- | crates/ra_mbe/src/mbe_expander.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_mbe/src/mbe_expander.rs b/crates/ra_mbe/src/mbe_expander.rs index eec713d9c..f6177f078 100644 --- a/crates/ra_mbe/src/mbe_expander.rs +++ b/crates/ra_mbe/src/mbe_expander.rs | |||
@@ -3,6 +3,7 @@ | |||
3 | /// `tt::TokenTree` for the result of the expansion. | 3 | /// `tt::TokenTree` for the result of the expansion. |
4 | use rustc_hash::FxHashMap; | 4 | use rustc_hash::FxHashMap; |
5 | use ra_syntax::SmolStr; | 5 | use ra_syntax::SmolStr; |
6 | use tt::TokenId; | ||
6 | 7 | ||
7 | use crate::tt_cursor::TtCursor; | 8 | use crate::tt_cursor::TtCursor; |
8 | 9 | ||
@@ -185,7 +186,8 @@ fn expand_tt( | |||
185 | } | 186 | } |
186 | crate::TokenTree::Leaf(leaf) => match leaf { | 187 | crate::TokenTree::Leaf(leaf) => match leaf { |
187 | crate::Leaf::Ident(ident) => { | 188 | crate::Leaf::Ident(ident) => { |
188 | tt::Leaf::from(tt::Ident { text: ident.text.clone() }).into() | 189 | tt::Leaf::from(tt::Ident { text: ident.text.clone(), id: TokenId::unspecified() }) |
190 | .into() | ||
189 | } | 191 | } |
190 | crate::Leaf::Punct(punct) => tt::Leaf::from(punct.clone()).into(), | 192 | crate::Leaf::Punct(punct) => tt::Leaf::from(punct.clone()).into(), |
191 | crate::Leaf::Var(v) => bindings.get(&v.text, nesting)?.clone(), | 193 | crate::Leaf::Var(v) => bindings.get(&v.text, nesting)?.clone(), |