14
14
//! ownership of the original.
15
15
16
16
use std:: borrow:: Cow ;
17
- use std:: hash:: Hash ;
18
17
use std:: { cmp, fmt, iter} ;
19
18
20
19
use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
@@ -106,15 +105,6 @@ where
106
105
}
107
106
}
108
107
}
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
-
118
108
pub trait ToAttrTokenStream : sync:: DynSend + sync:: DynSync {
119
109
fn to_attr_token_stream ( & self ) -> AttrTokenStream ;
120
110
}
@@ -309,7 +299,7 @@ pub struct TokenStream(pub(crate) Lrc<Vec<TokenTree>>);
309
299
/// compound token. Used for conversions to `proc_macro::Spacing`. Also used to
310
300
/// guide pretty-printing, which is where the `JointHidden` value (which isn't
311
301
/// 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 ) ]
313
303
pub enum Spacing {
314
304
/// The token cannot join with the following token to form a compound
315
305
/// token.
@@ -737,7 +727,7 @@ impl TokenTreeCursor {
737
727
}
738
728
}
739
729
740
- #[ derive( Debug , Copy , Clone , PartialEq , Encodable , Decodable , HashStable_Generic , Hash ) ]
730
+ #[ derive( Debug , Copy , Clone , PartialEq , Encodable , Decodable , HashStable_Generic ) ]
741
731
pub struct DelimSpan {
742
732
pub open : Span ,
743
733
pub close : Span ,
@@ -761,7 +751,7 @@ impl DelimSpan {
761
751
}
762
752
}
763
753
764
- #[ derive( Copy , Clone , Debug , PartialEq , Encodable , Decodable , HashStable_Generic , Hash ) ]
754
+ #[ derive( Copy , Clone , Debug , PartialEq , Encodable , Decodable , HashStable_Generic ) ]
765
755
pub struct DelimSpacing {
766
756
pub open : Spacing ,
767
757
pub close : Spacing ,
0 commit comments