1
Fork 0

token::LArrow can begin arguments

`<-` may indicate the start of a negative const argument.
This commit is contained in:
varkor 2019-05-06 17:00:01 +01:00
parent 7ac02005f3
commit 594685b5a2
3 changed files with 4 additions and 9 deletions

View file

@ -2319,7 +2319,8 @@ impl<'a> Parser<'a> {
let ident = self.parse_path_segment_ident()?;
let is_args_start = |token: &token::Token| match *token {
token::Lt | token::BinOp(token::Shl) | token::OpenDelim(token::Paren) => true,
token::Lt | token::BinOp(token::Shl) | token::OpenDelim(token::Paren)
| token::LArrow => true,
_ => false,
};
let check_args_start = |this: &mut Self| {