aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2020-12-11 22:14:11 +0000
committerEdwin Cheng <[email protected]>2020-12-11 22:14:11 +0000
commitae29fb021142464684478656e0c65deb912624bc (patch)
treeb2cc65df7f2b886651d5433fc48694a9041a1154
parent175229ab3d3243991aebfad6cf7052c1b5bc4ecf (diff)
Add missing arg for eat_char
-rw-r--r--crates/mbe/src/mbe_expander/matcher.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/mbe/src/mbe_expander/matcher.rs b/crates/mbe/src/mbe_expander/matcher.rs
index 4860b242d..93ee77908 100644
--- a/crates/mbe/src/mbe_expander/matcher.rs
+++ b/crates/mbe/src/mbe_expander/matcher.rs
@@ -357,9 +357,9 @@ impl<'a> TtIter<'a> {
357 } 357 }
358 } 358 }
359 359
360 pub(crate) fn eat_char(&mut self) -> Option<tt::TokenTree> { 360 pub(crate) fn eat_char(&mut self, c: char) -> Option<tt::TokenTree> {
361 let mut fork = self.clone(); 361 let mut fork = self.clone();
362 match fork.expect_char('-') { 362 match fork.expect_char(c) {
363 Ok(_) => { 363 Ok(_) => {
364 let tt = self.next().cloned(); 364 let tt = self.next().cloned();
365 *self = fork; 365 *self = fork;
@@ -460,7 +460,7 @@ fn match_meta_var(kind: &str, input: &mut TtIter) -> ExpandResult<Option<Fragmen
460 .map(|tt| Some(tt)) 460 .map(|tt| Some(tt))
461 .map_err(|()| err!("expected lifetime")), 461 .map_err(|()| err!("expected lifetime")),
462 "literal" => { 462 "literal" => {
463 let neg = input.eat_char(); 463 let neg = input.eat_char('-');
464 input 464 input
465 .expect_literal() 465 .expect_literal()
466 .map(|literal| { 466 .map(|literal| {