aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe/src/expander/matcher.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mbe/src/expander/matcher.rs')
-rw-r--r--crates/mbe/src/expander/matcher.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/mbe/src/expander/matcher.rs b/crates/mbe/src/expander/matcher.rs
index b4f2fe9a4..0d694b1a7 100644
--- a/crates/mbe/src/expander/matcher.rs
+++ b/crates/mbe/src/expander/matcher.rs
@@ -645,7 +645,7 @@ fn match_loop(pattern: &MetaTemplate, src: &tt::Subtree) -> Match {
645 None if match_res.err.is_none() => { 645 None if match_res.err.is_none() => {
646 bindings_builder.push_optional(&mut item.bindings, name); 646 bindings_builder.push_optional(&mut item.bindings, name);
647 } 647 }
648 _ => {} 648 None => {}
649 } 649 }
650 if let Some(err) = match_res.err { 650 if let Some(err) = match_res.err {
651 res.add_err(err); 651 res.add_err(err);
@@ -756,7 +756,7 @@ impl<'a> TtIter<'a> {
756 let ok = match separator { 756 let ok = match separator {
757 Separator::Ident(lhs) if idx == 0 => match fork.expect_ident_or_underscore() { 757 Separator::Ident(lhs) if idx == 0 => match fork.expect_ident_or_underscore() {
758 Ok(rhs) => rhs.text == lhs.text, 758 Ok(rhs) => rhs.text == lhs.text,
759 _ => false, 759 Err(_) => false,
760 }, 760 },
761 Separator::Literal(lhs) if idx == 0 => match fork.expect_literal() { 761 Separator::Literal(lhs) if idx == 0 => match fork.expect_literal() {
762 Ok(rhs) => match rhs { 762 Ok(rhs) => match rhs {
@@ -764,11 +764,11 @@ impl<'a> TtIter<'a> {
764 tt::Leaf::Ident(rhs) => rhs.text == lhs.text, 764 tt::Leaf::Ident(rhs) => rhs.text == lhs.text,
765 tt::Leaf::Punct(_) => false, 765 tt::Leaf::Punct(_) => false,
766 }, 766 },
767 _ => false, 767 Err(_) => false,
768 }, 768 },
769 Separator::Puncts(lhss) if idx < lhss.len() => match fork.expect_punct() { 769 Separator::Puncts(lhss) if idx < lhss.len() => match fork.expect_punct() {
770 Ok(rhs) => rhs.char == lhss[idx].char, 770 Ok(rhs) => rhs.char == lhss[idx].char,
771 _ => false, 771 Err(_) => false,
772 }, 772 },
773 _ => false, 773 _ => false,
774 }; 774 };