Do not clone Arc when hashing span.

This commit is contained in:
Camille GILLOT
2025-04-03 16:19:33 +00:00
parent 00b526212b
commit a5ff3cc3f5
3 changed files with 10 additions and 10 deletions

View File

@@ -2600,7 +2600,7 @@ pub trait HashStableContext {
fn span_data_to_lines_and_cols(
&mut self,
span: &SpanData,
) -> Option<(Arc<SourceFile>, usize, BytePos, usize, BytePos)>;
) -> Option<(StableSourceFileId, usize, BytePos, usize, BytePos)>;
fn hashing_controls(&self) -> HashingControls;
}
@@ -2657,7 +2657,7 @@ where
};
Hash::hash(&TAG_VALID_SPAN, hasher);
Hash::hash(&file.stable_id, hasher);
Hash::hash(&file, hasher);
// Hash both the length and the end location (line/column) of a span. If we
// hash only the length, for example, then two otherwise equal spans with