1414//! ownership of the original.
1515
1616use std:: borrow:: Cow ;
17- use std:: hash:: Hash ;
1817use std:: { cmp, fmt, iter} ;
1918
2019use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
@@ -106,15 +105,6 @@ where
106105 }
107106 }
108107}
109-
110- /*impl Hash for TokenStream {
111- fn hash<H: Hasher>(&self, state: &mut H) {
112- for sub_tt in self.trees() {
113- sub_tt.hash(state);
114- }
115- }
116- }*/
117-
118108pub trait ToAttrTokenStream : sync:: DynSend + sync:: DynSync {
119109 fn to_attr_token_stream ( & self ) -> AttrTokenStream ;
120110}
@@ -309,7 +299,7 @@ pub struct TokenStream(pub(crate) Lrc<Vec<TokenTree>>);
309299/// compound token. Used for conversions to `proc_macro::Spacing`. Also used to
310300/// guide pretty-printing, which is where the `JointHidden` value (which isn't
311301/// part of `proc_macro::Spacing`) comes in useful.
312- #[ derive( Clone , Copy , Debug , PartialEq , Encodable , Decodable , HashStable_Generic , Hash ) ]
302+ #[ derive( Clone , Copy , Debug , PartialEq , Encodable , Decodable , HashStable_Generic ) ]
313303pub enum Spacing {
314304 /// The token cannot join with the following token to form a compound
315305 /// token.
@@ -737,7 +727,7 @@ impl TokenTreeCursor {
737727 }
738728}
739729
740- #[ derive( Debug , Copy , Clone , PartialEq , Encodable , Decodable , HashStable_Generic , Hash ) ]
730+ #[ derive( Debug , Copy , Clone , PartialEq , Encodable , Decodable , HashStable_Generic ) ]
741731pub struct DelimSpan {
742732 pub open : Span ,
743733 pub close : Span ,
@@ -761,7 +751,7 @@ impl DelimSpan {
761751 }
762752}
763753
764- #[ derive( Copy , Clone , Debug , PartialEq , Encodable , Decodable , HashStable_Generic , Hash ) ]
754+ #[ derive( Copy , Clone , Debug , PartialEq , Encodable , Decodable , HashStable_Generic ) ]
765755pub struct DelimSpacing {
766756 pub open : Spacing ,
767757 pub close : Spacing ,
0 commit comments