aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_mbe')
-rw-r--r--crates/ra_mbe/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs
index 45dad2d10..2c6ae5658 100644
--- a/crates/ra_mbe/src/lib.rs
+++ b/crates/ra_mbe/src/lib.rs
@@ -97,7 +97,9 @@ impl Shift {
97 tt::Leaf::Literal(lit) => lit.id = self.shift(lit.id), 97 tt::Leaf::Literal(lit) => lit.id = self.shift(lit.id),
98 }, 98 },
99 tt::TokenTree::Subtree(tt) => { 99 tt::TokenTree::Subtree(tt) => {
100 tt.delimiter.as_mut().map(|it: &mut Delimiter| it.id = self.shift(it.id)); 100 if let Some(it) = tt.delimiter.as_mut() {
101 it.id = self.shift(it.id);
102 };
101 self.shift_all(tt) 103 self.shift_all(tt)
102 } 104 }
103 } 105 }