mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Add missing arg for eat_char
This commit is contained in:
parent
175229ab3d
commit
ae29fb0211
1 changed files with 3 additions and 3 deletions
|
@ -357,9 +357,9 @@ impl<'a> TtIter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn eat_char(&mut self) -> Option<tt::TokenTree> {
|
||||
pub(crate) fn eat_char(&mut self, c: char) -> Option<tt::TokenTree> {
|
||||
let mut fork = self.clone();
|
||||
match fork.expect_char('-') {
|
||||
match fork.expect_char(c) {
|
||||
Ok(_) => {
|
||||
let tt = self.next().cloned();
|
||||
*self = fork;
|
||||
|
@ -460,7 +460,7 @@ fn match_meta_var(kind: &str, input: &mut TtIter) -> ExpandResult<Option<Fragmen
|
|||
.map(|tt| Some(tt))
|
||||
.map_err(|()| err!("expected lifetime")),
|
||||
"literal" => {
|
||||
let neg = input.eat_char();
|
||||
let neg = input.eat_char('-');
|
||||
input
|
||||
.expect_literal()
|
||||
.map(|literal| {
|
||||
|
|
Loading…
Reference in a new issue