aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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| {