Skip to content
2 changes: 1 addition & 1 deletion compiler/rustc_abi/src/extern_abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::fmt;
use std::hash::{Hash, Hasher};

#[cfg(feature = "nightly")]
use rustc_data_structures::stable_hasher::{StableHash, StableHashCtxt, StableHasher, StableOrd};
use rustc_data_structures::stable_hash::{StableHash, StableHashCtxt, StableHasher, StableOrd};
#[cfg(feature = "nightly")]
use rustc_macros::{Decodable, Encodable};
#[cfg(feature = "nightly")]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use std::str::FromStr;

use bitflags::bitflags;
#[cfg(feature = "nightly")]
use rustc_data_structures::stable_hasher::StableOrd;
use rustc_data_structures::stable_hash::StableOrd;
#[cfg(feature = "nightly")]
use rustc_error_messages::{DiagArgValue, IntoDiagArg};
#[cfg(feature = "nightly")]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub use GenericArgs::*;
pub use UnsafeSource::*;
pub use rustc_ast_ir::{FloatTy, IntTy, Movability, Mutability, Pinnedness, UintTy};
use rustc_data_structures::packed::Pu128;
use rustc_data_structures::stable_hasher::{StableHash, StableHashCtxt, StableHasher};
use rustc_data_structures::stable_hash::{StableHash, StableHashCtxt, StableHasher};
use rustc_data_structures::stack::ensure_sufficient_stack;
use rustc_data_structures::tagged_ptr::Tag;
use rustc_macros::{Decodable, Encodable, StableHash, Walkable};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/node_id.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::fmt;

use rustc_data_structures::stable_hasher::{StableHash, StableHashCtxt, StableHasher};
use rustc_data_structures::stable_hash::{StableHash, StableHashCtxt, StableHasher};
use rustc_span::LocalExpnId;

rustc_index::newtype_index! {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/tokenstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::ops::Range;
use std::sync::Arc;
use std::{cmp, fmt, iter, mem};

use rustc_data_structures::stable_hasher::{StableHash, StableHashCtxt, StableHasher};
use rustc_data_structures::stable_hash::{StableHash, StableHashCtxt, StableHasher};
use rustc_data_structures::sync;
use rustc_macros::{Decodable, Encodable, StableHash, Walkable};
use rustc_serialize::{Decodable, Encodable};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use rustc_attr_parsing::{AttributeParser, OmitDoc, Recovery, ShouldEmit};
use rustc_data_structures::fingerprint::Fingerprint;
use rustc_data_structures::fx::FxIndexSet;
use rustc_data_structures::sorted_map::SortedMap;
use rustc_data_structures::stable_hasher::{StableHash, StableHasher};
use rustc_data_structures::stable_hash::{StableHash, StableHasher};
use rustc_data_structures::steal::Steal;
use rustc_data_structures::tagged_ptr::TaggedRef;
use rustc_errors::{DiagArgFromDisplay, DiagCtxtHandle};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/src/driver/aot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use rustc_codegen_ssa::back::write::produce_final_output_artifacts;
use rustc_codegen_ssa::base::determine_cgu_reuse;
use rustc_codegen_ssa::{CompiledModule, CompiledModules, ModuleKind};
use rustc_data_structures::profiling::SelfProfilerRef;
use rustc_data_structures::stable_hasher::{StableHash, StableHashCtxt, StableHasher};
use rustc_data_structures::stable_hash::{StableHash, StableHashCtxt, StableHasher};
use rustc_data_structures::sync::{IntoDynSyncSend, par_map};
use rustc_hir::attrs::Linkage as RLinkage;
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use rustc_abi::{self as abi, HasDataLayout as _};
use rustc_ast::Mutability;
use rustc_codegen_ssa::common::TypeKind;
use rustc_codegen_ssa::traits::*;
use rustc_data_structures::stable_hasher::{StableHash, StableHasher};
use rustc_data_structures::stable_hash::{StableHash, StableHasher};
use rustc_hashes::Hash128;
use rustc_hir::def_id::DefId;
use rustc_middle::bug;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use libc::c_uint;
use rustc_abi::{Align, Size, VariantIdx};
use rustc_data_structures::fingerprint::Fingerprint;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::stable_hasher::{StableHash, StableHasher};
use rustc_data_structures::stable_hash::{StableHash, StableHasher};
use rustc_macros::StableHash;
use rustc_middle::bug;
use rustc_middle::ty::{self, ExistentialTraitRef, Ty, TyCtxt, Unnormalized};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/back/link/raw_dylib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::path::{Path, PathBuf};
use rustc_abi::Endian;
use rustc_data_structures::base_n::{CASE_INSENSITIVE, ToBaseN};
use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
use rustc_data_structures::stable_hasher::StableHasher;
use rustc_data_structures::stable_hash::StableHasher;
use rustc_hashes::Hash128;
use rustc_hir::attrs::NativeLibKind;
use rustc_session::Session;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub enum TypeKind {
// for now we content ourselves with providing a no-op StableHash
// implementation for CGUs.
mod temp_stable_hash_impls {
use rustc_data_structures::stable_hasher::{StableHash, StableHashCtxt, StableHasher};
use rustc_data_structures::stable_hash::{StableHash, StableHashCtxt, StableHasher};

use crate::ModuleCodegen;

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::fmt::Write;

use rustc_abi::Integer;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::stable_hasher::{StableHash, StableHasher};
use rustc_data_structures::stable_hash::{StableHash, StableHasher};
use rustc_hashes::Hash64;
use rustc_hir::def_id::DefId;
use rustc_hir::definitions::{DefPathData, DefPathDataName, DisambiguatedDefPathData};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/fingerprint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::hash::{Hash, Hasher};
use rustc_hashes::Hash64;
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};

use crate::stable_hasher::{FromStableHash, StableHasherHash, impl_stable_traits_for_trivial_type};
use crate::stable_hash::{FromStableHash, StableHasherHash, impl_stable_traits_for_trivial_type};

#[cfg(test)]
mod tests;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/intern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::hash::{Hash, Hasher};
use std::ops::Deref;
use std::ptr;

use crate::stable_hasher::{StableHash, StableHashCtxt, StableHasher};
use crate::stable_hash::{StableHash, StableHashCtxt, StableHasher};

mod private {
#[derive(Clone, Copy, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub mod small_c_str;
pub mod snapshot_map;
pub mod sorted_map;
pub mod sso;
pub mod stable_hasher;
pub mod stable_hash;
pub mod stack;
pub mod steal;
pub mod svh;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/packed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::fmt;

use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};

use crate::stable_hasher::{StableHash, StableHashCtxt, StableHasher};
use crate::stable_hash::{StableHash, StableHashCtxt, StableHasher};

/// A packed 128-bit integer. Useful for reducing the size of structures in
/// some cases.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/sorted_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::ops::{Bound, Index, IndexMut, RangeBounds};

use rustc_macros::{Decodable_NoContext, Encodable_NoContext};

use crate::stable_hasher::{StableHash, StableHashCtxt, StableHasher, StableOrd};
use crate::stable_hash::{StableHash, StableHashCtxt, StableHasher, StableOrd};

mod index_map;

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/sorted_map/index_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub struct SortedIndexMultiMap<I: Idx, K, V> {
items: IndexVec<I, (K, V)>,

// We can ignore this field because it is not observable from the outside.
#[stable_hasher(ignore)]
#[stable_hash(ignore)]
/// Indices of the items in the set, sorted by the item's key.
idx_sorted_by_item_key: Vec<I>,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ pub use rustc_stable_hash::{
/// visible.
pub trait StableHashCtxt {
/// The main event: stable hashing of a span.
fn span_hash_stable(&mut self, span: RawSpan, hasher: &mut StableHasher);
fn stable_hash_span(&mut self, span: RawSpan, hasher: &mut StableHasher);

/// Compute a `DefPathHash`.
fn def_path_hash(&self, def_id: RawDefId) -> RawDefPathHash;

/// Get the hashing controls.
fn hashing_controls(&self) -> HashingControls;
/// Get the stable hash controls.
fn stable_hash_controls(&self) -> StableHashControls;

/// Assert that the provided `StableHashCtxt` is configured with the default
/// `HashingControls`. We should always have bailed out before getting to here with a
fn assert_default_hashing_controls(&self, msg: &str);
/// `StableHashControls`. We should always have bailed out before getting to here with a
fn assert_default_stable_hash_controls(&self, msg: &str);
}

// A type used to work around `Span` not being visible in this crate. It is the same layout as
Expand Down Expand Up @@ -167,18 +167,18 @@ impl<T: StableOrd> StableCompare for T {
/// Use `#[derive(StableHash)]` instead.
macro_rules! impl_stable_traits_for_trivial_type {
($t:ty) => {
impl $crate::stable_hasher::StableHash for $t {
impl $crate::stable_hash::StableHash for $t {
#[inline]
fn stable_hash<Hcx>(
&self,
_: &mut Hcx,
hasher: &mut $crate::stable_hasher::StableHasher,
hasher: &mut $crate::stable_hash::StableHasher,
) {
::std::hash::Hash::hash(self, hasher);
}
}

impl $crate::stable_hasher::StableOrd for $t {
impl $crate::stable_hash::StableOrd for $t {
const CAN_USE_UNSTABLE_SORT: bool = true;

// Encoding and decoding doesn't change the bytes of trivial types
Expand Down Expand Up @@ -628,12 +628,12 @@ where

/// Controls what data we do or do not hash.
/// Whenever a `StableHash` implementation caches its
/// result, it needs to include `HashingControls` as part
/// result, it needs to include `StableHashControls` as part
/// of the key, to ensure that it does not produce an incorrect
/// result (for example, using a `Fingerprint` produced while
/// hashing `Span`s when a `Fingerprint` without `Span`s is
/// being requested)
#[derive(Clone, Copy, Hash, Eq, PartialEq, Debug)]
pub struct HashingControls {
pub struct StableHashControls {
pub hash_spans: bool,
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ use super::*;
// need to be updated whenever StableHasher changes its hashing algorithm.

impl StableHashCtxt for () {
fn span_hash_stable(&mut self, _: RawSpan, _: &mut StableHasher) {
fn stable_hash_span(&mut self, _: RawSpan, _: &mut StableHasher) {
panic!();
}
fn def_path_hash(&self, _: RawDefId) -> RawDefPathHash {
panic!();
}
fn hashing_controls(&self) -> HashingControls {
fn stable_hash_controls(&self) -> StableHashControls {
panic!();
}
fn assert_default_hashing_controls(&self, _: &str) {
fn assert_default_stable_hash_controls(&self, _: &str) {
panic!();
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/steal.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::stable_hasher::{StableHash, StableHashCtxt, StableHasher};
use crate::stable_hash::{StableHash, StableHashCtxt, StableHasher};
use crate::sync::{MappedReadGuard, MappedWriteGuard, ReadGuard, RwLock, WriteGuard};

/// The `Steal` struct is intended to used as the value for a query.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/tagged_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::ops::Deref;
use std::ptr::NonNull;

use crate::aligned::Aligned;
use crate::stable_hasher::{StableHash, StableHashCtxt, StableHasher};
use crate::stable_hash::{StableHash, StableHashCtxt, StableHasher};

/// This describes tags that the [`TaggedRef`] struct can hold.
///
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_data_structures/src/tagged_ptr/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::ptr;
use rustc_hashes::Hash128;

use super::*;
use crate::stable_hasher::{StableHash, StableHasher};
use crate::stable_hash::{StableHash, StableHasher};

/// A tag type used in [`TaggedRef`] tests.
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
Expand Down Expand Up @@ -36,7 +36,7 @@ impl StableHash for Tag2 {
fn stable_hash<Hcx: StableHashCtxt>(
&self,
hcx: &mut Hcx,
hasher: &mut crate::stable_hasher::StableHasher,
hasher: &mut crate::stable_hash::StableHasher,
) {
(*self as u8).stable_hash(hcx, hasher);
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/unord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use rustc_macros::{Decodable_NoContext, Encodable_NoContext};

use crate::fingerprint::Fingerprint;
use crate::fx::{FxBuildHasher, FxHashMap, FxHashSet};
use crate::stable_hasher::{
use crate::stable_hash::{
StableCompare, StableHash, StableHashCtxt, StableHasher, ToStableHashKey,
};

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_errors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub use emitter::ColorConfig;
use emitter::{DynEmitter, Emitter};
use rustc_data_structures::AtomicRef;
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
use rustc_data_structures::stable_hasher::StableHasher;
use rustc_data_structures::stable_hash::StableHasher;
use rustc_data_structures::sync::{DynSend, Lock};
pub use rustc_error_messages::{
DiagArg, DiagArgFromDisplay, DiagArgMap, DiagArgName, DiagArgValue, DiagMessage, IntoDiagArg,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::time::{SystemTime, UNIX_EPOCH};

use rustc_data_structures::AtomicRef;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::stable_hasher::{StableHash, StableHashCtxt, StableHasher};
use rustc_data_structures::stable_hash::{StableHash, StableHashCtxt, StableHasher};
use rustc_span::{Span, Symbol, sym};

use super::{Feature, to_nonzero};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir/src/def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::fmt::Debug;

use rustc_ast as ast;
use rustc_ast::NodeId;
use rustc_data_structures::stable_hasher::ToStableHashKey;
use rustc_data_structures::stable_hash::ToStableHashKey;
use rustc_data_structures::unord::UnordMap;
use rustc_error_messages::{DiagArgValue, IntoDiagArg};
use rustc_macros::{Decodable, Encodable, StableHash};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir/src/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::fmt::{self, Write};
use std::hash::Hash;

use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::stable_hasher::StableHasher;
use rustc_data_structures::stable_hash::StableHasher;
use rustc_hashes::Hash64;
use rustc_index::IndexVec;
use rustc_macros::{BlobDecodable, Decodable, Encodable, extension};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir/src/diagnostic_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::def_id::DefId;

#[derive(Debug, Default, StableHash)]
pub struct DiagnosticItems {
#[stable_hasher(ignore)]
#[stable_hash(ignore)]
pub id_to_name: DefIdMap<Symbol>,
pub name_to_id: FxIndexMap<Symbol, DefId>,
}
Loading
Loading