diff --git a/src/librustc/ich/impls_syntax.rs b/src/librustc/ich/impls_syntax.rs index bf716dbf0619..d86fd0f1dc36 100644 --- a/src/librustc/ich/impls_syntax.rs +++ b/src/librustc/ich/impls_syntax.rs @@ -137,25 +137,6 @@ for tokenstream::TokenStream { } } -impl_stable_hash_for!(enum token::LitKind { - Bool, - Byte, - Char, - Integer, - Float, - Str, - ByteStr, - StrRaw(n), - ByteStrRaw(n), - Err -}); - -impl_stable_hash_for!(struct token::Lit { - kind, - symbol, - suffix -}); - impl<'a> HashStable> for token::TokenKind { fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) { mem::discriminant(self).hash_stable(hcx, hasher); diff --git a/src/libsyntax/token.rs b/src/libsyntax/token.rs index ab798e93d67f..8099b55780cb 100644 --- a/src/libsyntax/token.rs +++ b/src/libsyntax/token.rs @@ -53,7 +53,7 @@ impl DelimToken { } } -#[derive(Clone, Copy, PartialEq, RustcEncodable, RustcDecodable, Debug)] +#[derive(Clone, Copy, PartialEq, RustcEncodable, RustcDecodable, Debug, HashStable_Generic)] pub enum LitKind { Bool, // AST only, must never appear in a `Token` Byte, @@ -68,7 +68,7 @@ pub enum LitKind { } /// A literal token. -#[derive(Clone, Copy, PartialEq, RustcEncodable, RustcDecodable, Debug)] +#[derive(Clone, Copy, PartialEq, RustcEncodable, RustcDecodable, Debug, HashStable_Generic)] pub struct Lit { pub kind: LitKind, pub symbol: Symbol,