Skip to content

Commit bf7c9ba

Browse files
committed
Derive HashStable_Generic for ExpnData.
1 parent 640797f commit bf7c9ba

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/librustc/ich/impls_syntax.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -197,17 +197,6 @@ impl_stable_hash_for!(enum ::syntax::ast::MetaItemKind {
197197
NameValue(lit)
198198
});
199199

200-
impl_stable_hash_for!(struct ::syntax_pos::hygiene::ExpnData {
201-
kind,
202-
parent -> _,
203-
call_site,
204-
def_site,
205-
allow_internal_unstable,
206-
allow_internal_unsafe,
207-
local_inner_macros,
208-
edition
209-
});
210-
211200
impl<'a> HashStable<StableHashingContext<'a>> for SourceFile {
212201
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
213202
let SourceFile {

src/libsyntax_pos/hygiene.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,12 +616,13 @@ impl Span {
616616

617617
/// A subset of properties from both macro definition and macro call available through global data.
618618
/// Avoid using this if you have access to the original definition or call structures.
619-
#[derive(Clone, Debug, RustcEncodable, RustcDecodable)]
619+
#[derive(Clone, Debug, RustcEncodable, RustcDecodable, HashStable_Generic)]
620620
pub struct ExpnData {
621621
// --- The part unique to each expansion.
622622
/// The kind of this expansion - macro or compiler desugaring.
623623
pub kind: ExpnKind,
624624
/// The expansion that produced this expansion.
625+
#[stable_hasher(ignore)]
625626
pub parent: ExpnId,
626627
/// The location of the actual macro invocation or syntax sugar , e.g.
627628
/// `let x = foo!();` or `if let Some(y) = x {}`

0 commit comments

Comments
 (0)