diff options
Diffstat (limited to 'src/libsyntax/tokenstream.rs')
| -rw-r--r-- | src/libsyntax/tokenstream.rs | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/libsyntax/tokenstream.rs b/src/libsyntax/tokenstream.rs index 650d6333b55..048a041f698 100644 --- a/src/libsyntax/tokenstream.rs +++ b/src/libsyntax/tokenstream.rs @@ -33,10 +33,9 @@ use util::RcSlice; use std::borrow::Cow; use std::{fmt, iter, mem}; -use std::hash::{self, Hash}; /// A delimited sequence of token trees -#[derive(Clone, PartialEq, RustcEncodable, RustcDecodable, Hash, Debug)] +#[derive(Clone, PartialEq, RustcEncodable, RustcDecodable, Debug)] pub struct Delimited { /// The type of delimiter pub delim: token::DelimToken, @@ -93,7 +92,7 @@ impl Delimited { /// /// The RHS of an MBE macro is the only place `SubstNt`s are substituted. /// Nothing special happens to misnamed or misplaced `SubstNt`s. -#[derive(Debug, Clone, PartialEq, RustcEncodable, RustcDecodable, Hash)] +#[derive(Debug, Clone, PartialEq, RustcEncodable, RustcDecodable)] pub enum TokenTree { /// A single token Token(Span, token::Token), @@ -605,14 +604,6 @@ impl Decodable for TokenStream { } } -impl Hash for TokenStream { - fn hash<H: hash::Hasher>(&self, state: &mut H) { - for tree in self.trees() { - tree.hash(state); - } - } -} - impl Encodable for ThinTokenStream { fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), E::Error> { TokenStream::from(self.clone()).encode(encoder) @@ -625,13 +616,6 @@ impl Decodable for ThinTokenStream { } } -impl Hash for ThinTokenStream { - fn hash<H: hash::Hasher>(&self, state: &mut H) { - TokenStream::from(self.clone()).hash(state); - } -} - - #[cfg(test)] mod tests { use super::*; |
