aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_mbe/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs
index 7d4a5f307..f51149258 100644
--- a/crates/ra_mbe/src/lib.rs
+++ b/crates/ra_mbe/src/lib.rs
@@ -72,7 +72,7 @@ fn find_subtree_shift(tt: &tt::Subtree, mut cur: Option<u32>) -> Option<u32> {
72} 72}
73 73
74/// Shift given TokenTree token id 74/// Shift given TokenTree token id
75fn shift_token_tree(tt: &mut tt::Subtree, shift: u32) { 75fn shift_subtree(tt: &mut tt::Subtree, shift: u32) {
76 for t in tt.token_trees.iter_mut() { 76 for t in tt.token_trees.iter_mut() {
77 match t { 77 match t {
78 tt::TokenTree::Leaf(leaf) => match leaf { 78 tt::TokenTree::Leaf(leaf) => match leaf {
@@ -83,7 +83,7 @@ fn shift_token_tree(tt: &mut tt::Subtree, shift: u32) {
83 } 83 }
84 _ => (), 84 _ => (),
85 }, 85 },
86 tt::TokenTree::Subtree(tt) => shift_token_tree(tt, shift), 86 tt::TokenTree::Subtree(tt) => shift_subtree(tt, shift),
87 } 87 }
88 } 88 }
89} 89}
@@ -117,7 +117,7 @@ impl MacroRules {
117 // apply shift 117 // apply shift
118 let mut tt = tt.clone(); 118 let mut tt = tt.clone();
119 if let Some(shift) = self.shift { 119 if let Some(shift) = self.shift {
120 shift_token_tree(&mut tt, shift) 120 shift_subtree(&mut tt, shift)
121 } 121 }
122 122
123 mbe_expander::expand(self, &tt) 123 mbe_expander::expand(self, &tt)