diff options
Diffstat (limited to 'crates/mbe/src/expander')
-rw-r--r-- | crates/mbe/src/expander/matcher.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/mbe/src/expander/matcher.rs b/crates/mbe/src/expander/matcher.rs index b6782b4ba..1682b21b0 100644 --- a/crates/mbe/src/expander/matcher.rs +++ b/crates/mbe/src/expander/matcher.rs | |||
@@ -762,7 +762,7 @@ impl<'a> TtIter<'a> { | |||
762 | fn expect_separator(&mut self, separator: &Separator, idx: usize) -> bool { | 762 | fn expect_separator(&mut self, separator: &Separator, idx: usize) -> bool { |
763 | let mut fork = self.clone(); | 763 | let mut fork = self.clone(); |
764 | let ok = match separator { | 764 | let ok = match separator { |
765 | Separator::Ident(lhs) if idx == 0 => match fork.expect_ident() { | 765 | Separator::Ident(lhs) if idx == 0 => match fork.expect_ident_or_underscore() { |
766 | Ok(rhs) => rhs.text == lhs.text, | 766 | Ok(rhs) => rhs.text == lhs.text, |
767 | _ => false, | 767 | _ => false, |
768 | }, | 768 | }, |
@@ -852,7 +852,7 @@ impl<'a> TtIter<'a> { | |||
852 | if punct.char != '\'' { | 852 | if punct.char != '\'' { |
853 | return Err(()); | 853 | return Err(()); |
854 | } | 854 | } |
855 | let ident = self.expect_ident()?; | 855 | let ident = self.expect_ident_or_underscore()?; |
856 | 856 | ||
857 | Ok(tt::Subtree { | 857 | Ok(tt::Subtree { |
858 | delimiter: None, | 858 | delimiter: None, |