aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/mbe_expander.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-02-03 15:12:07 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-02-03 15:12:07 +0000
commit581c97a5c3821e247df372f25cf8c01ed514bdd9 (patch)
tree64f53f0038332c069a28cb2d0768b4972abef2a5 /crates/ra_mbe/src/mbe_expander.rs
parentf370393bba767864398665519ad7615aef4f07bd (diff)
parentdbc307455632ba6d51899c0cbe5df0fb897e361b (diff)
Merge #730
730: Make sure we match the entire pattern r=matklad a=jrmuizel Co-authored-by: Jeff Muizelaar <[email protected]>
Diffstat (limited to 'crates/ra_mbe/src/mbe_expander.rs')
-rw-r--r--crates/ra_mbe/src/mbe_expander.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_mbe/src/mbe_expander.rs b/crates/ra_mbe/src/mbe_expander.rs
index af5beb786..2945e7359 100644
--- a/crates/ra_mbe/src/mbe_expander.rs
+++ b/crates/ra_mbe/src/mbe_expander.rs
@@ -13,6 +13,9 @@ pub(crate) fn exapnd(rules: &crate::MacroRules, input: &tt::Subtree) -> Option<t
13fn expand_rule(rule: &crate::Rule, input: &tt::Subtree) -> Option<tt::Subtree> { 13fn expand_rule(rule: &crate::Rule, input: &tt::Subtree) -> Option<tt::Subtree> {
14 let mut input = TtCursor::new(input); 14 let mut input = TtCursor::new(input);
15 let bindings = match_lhs(&rule.lhs, &mut input)?; 15 let bindings = match_lhs(&rule.lhs, &mut input)?;
16 if !input.is_eof() {
17 return None;
18 }
16 expand_subtree(&rule.rhs, &bindings, &mut Vec::new()) 19 expand_subtree(&rule.rhs, &bindings, &mut Vec::new())
17} 20}
18 21