Skip to content

Commit 3c5ddfd

Browse files
committed
Derive HashStable_Generic for Ident.
1 parent bf7c9ba commit 3c5ddfd

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/librustc/ich/impls_hir.rs

-5
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,6 @@ impl<'a> HashStable<StableHashingContext<'a>> for hir::Expr {
161161

162162
impl_stable_hash_for_spanned!(usize);
163163

164-
impl_stable_hash_for!(struct ast::Ident {
165-
name,
166-
span,
167-
});
168-
169164
impl<'a> HashStable<StableHashingContext<'a>> for hir::TraitItem {
170165
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
171166
let hir::TraitItem {

src/libsyntax_pos/symbol.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use arena::DroplessArena;
66
use rustc_data_structures::fx::FxHashMap;
77
use rustc_index::vec::Idx;
8-
use rustc_macros::symbols;
8+
use rustc_macros::{symbols, HashStable_Generic};
99
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
1010
use rustc_serialize::{UseSpecializedDecodable, UseSpecializedEncodable};
1111
use rustc_data_structures::stable_hasher::{HashStable, ToStableHashKey, StableHasher};
@@ -752,7 +752,7 @@ symbols! {
752752
}
753753
}
754754

755-
#[derive(Copy, Clone, Eq)]
755+
#[derive(Copy, Clone, Eq, HashStable_Generic)]
756756
pub struct Ident {
757757
pub name: Symbol,
758758
pub span: Span,

0 commit comments

Comments
 (0)