about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-06-10 19:33:30 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-06-28 11:04:50 +0300
commitc6ca1e4abdb9476d8aa68457414ef80c5249caee (patch)
tree1961ad3278476514ec8249654e2fd5bbbb87a1ea /src/libsyntax
parente8215a4f6f7b32d0f068e72ab9a9c9f85bab0cdb (diff)
downloadrust-c6ca1e4abdb9476d8aa68457414ef80c5249caee.tar.gz
rust-c6ca1e4abdb9476d8aa68457414ef80c5249caee.zip
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.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 21bd6c08324..faf2cf64e1d 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -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),
             }