mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 14:52:56 +03:00
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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user