Use Ident
s in a number of structures in HIR
Namely: labels, type parameters, bindings in patterns, parameter names in functions without body. All of these do not need hygiene after lowering to HIR, only span locations.
This commit is contained in:
parent
e8215a4f6f
commit
c6ca1e4abd
24 changed files with 125 additions and 156 deletions
|
@ -7325,7 +7325,7 @@ impl<'a> Parser<'a> {
|
|||
match self.token {
|
||||
token::Ident(ident, false) if ident.name == keywords::Underscore.name() => {
|
||||
self.bump(); // `_`
|
||||
Ok(Some(Ident::new(ident.name.gensymed(), ident.span)))
|
||||
Ok(Some(ident.gensym()))
|
||||
}
|
||||
_ => self.parse_ident().map(Some),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue