libsyntax: change Parser::unexpected_last to take &Token
This commit is contained in:
parent
28691a0852
commit
34c02a6c0e
2 changed files with 4 additions and 4 deletions
|
@ -634,7 +634,7 @@ pub impl Parser {
|
|||
|p| p.parse_ty_field()
|
||||
);
|
||||
if elems.len() == 0 {
|
||||
self.unexpected_last(token::RBRACE);
|
||||
self.unexpected_last(&token::RBRACE);
|
||||
}
|
||||
ty_rec(elems)
|
||||
} else if *self.token == token::LBRACKET {
|
||||
|
@ -868,7 +868,7 @@ pub impl Parser {
|
|||
lit_float_unsuffixed(self.id_to_str(s)),
|
||||
token::LIT_STR(s) => lit_str(self.id_to_str(s)),
|
||||
token::LPAREN => { self.expect(&token::RPAREN); lit_nil },
|
||||
_ => { self.unexpected_last(*tok); }
|
||||
_ => { self.unexpected_last(tok); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue