aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/mbe_expander.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_mbe/src/mbe_expander.rs')
-rw-r--r--crates/ra_mbe/src/mbe_expander.rs4
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.
4use rustc_hash::FxHashMap; 4use rustc_hash::FxHashMap;
5use ra_syntax::SmolStr; 5use ra_syntax::SmolStr;
6use tt::TokenId;
6 7
7use crate::tt_cursor::TtCursor; 8use 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(),