From 5d06c890fececc6f6779cd65ca83cef4647b8fdd Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 8 Mar 2018 14:27:23 +0300 Subject: syntax: Make `_` an identifier --- src/librustc/hir/mod.rs | 2 +- src/librustc/ich/impls_syntax.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src/librustc') diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs index f4638c23c5f..83e855178db 100644 --- a/src/librustc/hir/mod.rs +++ b/src/librustc/hir/mod.rs @@ -214,7 +214,7 @@ impl LifetimeName { use self::LifetimeName::*; match *self { Implicit => keywords::Invalid.name(), - Underscore => Symbol::intern("'_"), + Underscore => keywords::UnderscoreLifetime.name(), Static => keywords::StaticLifetime.name(), Name(name) => name, } diff --git a/src/librustc/ich/impls_syntax.rs b/src/librustc/ich/impls_syntax.rs index 289bc753d7f..513b6c835f9 100644 --- a/src/librustc/ich/impls_syntax.rs +++ b/src/librustc/ich/impls_syntax.rs @@ -287,7 +287,6 @@ fn hash_token<'a, 'gcx, W: StableHasherResult>( token::Token::Pound | token::Token::Dollar | token::Token::Question | - token::Token::Underscore | token::Token::Whitespace | token::Token::Comment | token::Token::Eof => {} -- cgit 1.4.1-3-g733a5