diff options
| -rw-r--r-- | src/librustc/ich/hcx.rs | 9 | ||||
| -rw-r--r-- | src/libsyntax/node_id.rs | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/librustc/ich/hcx.rs b/src/librustc/ich/hcx.rs index e0e8470fe47..9e2db35dc6d 100644 --- a/src/librustc/ich/hcx.rs +++ b/src/librustc/ich/hcx.rs @@ -219,12 +219,9 @@ impl<'a> ToStableHashKey<StableHashingContext<'a>> for hir::HirId { } } -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"); } } diff --git a/src/libsyntax/node_id.rs b/src/libsyntax/node_id.rs index 430d8f30421..58d2334a7b1 100644 --- a/src/libsyntax/node_id.rs +++ b/src/libsyntax/node_id.rs @@ -1,10 +1,8 @@ -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({})" |
