Use Token::uninterpolate in couple more places matching on (Nt)Ident

This commit is contained in:
Vadim Petrochenkov
2020-03-07 15:58:27 +03:00
parent 5d7f67d3b1
commit 9be233cbfe
7 changed files with 28 additions and 38 deletions

View File

@@ -1544,6 +1544,8 @@ impl<'a> Parser<'a> {
let is_name_required = match self.token.kind {
token::DotDotDot => false,
// FIXME: Consider using interpolated token for this edition check,
// it should match the intent of edition hygiene better.
_ => req_name(self.token.uninterpolate().span.edition()),
};
let (pat, ty) = if is_name_required || self.is_named_param() {