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:
parent
cd3c9329fb
commit
e2edce0221
2 changed files with 1 additions and 7 deletions
|
|
@ -85,11 +85,6 @@ impl<'a> HashStable<StableHashingContext<'a>> for ast::NodeId {
|
|||
}
|
||||
|
||||
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 @@ impl 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 @@ where
|
|||
const TAG_INVALID_SPAN: u8 = 1;
|
||||
const TAG_RELATIVE_SPAN: u8 = 2;
|
||||
|
||||
if !ctx.hash_spans() {
|
||||
if !ctx.hashing_controls().hash_spans {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue