mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 06:43:20 +03:00
Hash SyntaxContext first.
This commit is contained in:
@@ -1902,9 +1902,10 @@ fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.ctxt().hash_stable(ctx, hasher);
|
||||
|
||||
if self.is_dummy() {
|
||||
Hash::hash(&TAG_INVALID_SPAN, hasher);
|
||||
self.ctxt().hash_stable(ctx, hasher);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1917,7 +1918,6 @@ fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
|
||||
Some(pos) => pos,
|
||||
None => {
|
||||
Hash::hash(&TAG_INVALID_SPAN, hasher);
|
||||
span.ctxt.hash_stable(ctx, hasher);
|
||||
return;
|
||||
}
|
||||
};
|
||||
@@ -1944,7 +1944,6 @@ fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
|
||||
let len = (span.hi - span.lo).0;
|
||||
Hash::hash(&col_line, hasher);
|
||||
Hash::hash(&len, hasher);
|
||||
span.ctxt.hash_stable(ctx, hasher);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user