Remove rustc_span::HashStableContext::hash_spans.

It reads the `HashingControls::span` field, but there is also the
`hashing_controls` method. No need to have two different ways of doing
it.
This commit is contained in:
Nicholas Nethercote
2026-02-03 15:34:29 +11:00
parent cd3c9329fb
commit e2edce0221
2 changed files with 1 additions and 7 deletions
@@ -85,11 +85,6 @@ fn hash_stable(&self, _: &mut StableHashingContext<'a>, _: &mut StableHasher) {
}
impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> {
#[inline]
fn hash_spans(&self) -> bool {
self.hashing_controls.hash_spans
}
#[inline]
fn unstable_opts_incremental_ignore_spans(&self) -> bool {
self.incremental_ignore_spans
+1 -2
View File
@@ -2799,7 +2799,6 @@ pub fn new(start: usize, end: usize) -> InnerSpan {
/// instead of implementing everything in rustc_middle.
pub trait HashStableContext {
fn def_path_hash(&self, def_id: DefId) -> DefPathHash;
fn hash_spans(&self) -> bool;
/// Accesses `sess.opts.unstable_opts.incremental_ignore_spans` since
/// we don't have easy access to a `Session`
fn unstable_opts_incremental_ignore_spans(&self) -> bool;
@@ -2832,7 +2831,7 @@ fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
const TAG_INVALID_SPAN: u8 = 1;
const TAG_RELATIVE_SPAN: u8 = 2;
if !ctx.hash_spans() {
if !ctx.hashing_controls().hash_spans {
return;
}