}
}
-impl<'a> ToStableHashKey<StableHashingContext<'a>> for ast::NodeId {
- type KeyType = Self;
-
- #[inline]
- fn to_stable_hash_key(&self, _: &StableHashingContext<'a>) -> Self {
- *self
+impl<'a> HashStable<StableHashingContext<'a>> for ast::NodeId {
+ fn hash_stable(&self, _: &mut StableHashingContext<'a>, _: &mut StableHasher) {
+ panic!("Node IDs should not appear in incremental state");
}
}
-use rustc_macros::HashStable_Generic;
use rustc_serialize::{Decoder, Encoder};
use rustc_span::ExpnId;
use std::fmt;
rustc_index::newtype_index! {
- #[derive(HashStable_Generic)]
pub struct NodeId {
ENCODABLE = custom
DEBUG_FORMAT = "NodeId({})"