Lines Matching refs:hash
4 use std::hash::{Hash, Hasher};
51 fn hash<H: Hasher>(&self, h: &mut H) { in hash() method
56 0u8.hash(h); in hash()
58 Delimiter::Parenthesis => 0u8.hash(h), in hash()
59 Delimiter::Brace => 1u8.hash(h), in hash()
60 Delimiter::Bracket => 2u8.hash(h), in hash()
61 Delimiter::None => 3u8.hash(h), in hash()
65 TokenTreeHelper(&item).hash(h); in hash()
67 0xFFu8.hash(h); // terminator w/ a variant we don't normally hash in hash()
70 1u8.hash(h); in hash()
71 op.as_char().hash(h); in hash()
73 Spacing::Alone => 0u8.hash(h), in hash()
74 Spacing::Joint => 1u8.hash(h), in hash()
77 TokenTree::Literal(lit) => (2u8, lit.to_string()).hash(h), in hash()
78 TokenTree::Ident(word) => (3u8, word).hash(h), in hash()
102 fn hash<H: Hasher>(&self, state: &mut H) { in hash() method
104 tts.len().hash(state); in hash()
106 TokenTreeHelper(&tt).hash(state); in hash()