Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/rustc_abi/src/extern_abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ impl Hash for ExternAbi {
}

#[cfg(feature = "nightly")]
impl<C> HashStable<C> for ExternAbi {
impl<Hcx> HashStable<Hcx> for ExternAbi {
#[inline]
fn hash_stable(&self, _: &mut C, hasher: &mut StableHasher) {
fn hash_stable(&self, _: &Hcx, hasher: &mut StableHasher) {
Hash::hash(self, hasher);
}
}
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 @@ -121,7 +121,7 @@ impl PartialEq<&[Symbol]> for Path {
}

impl<Hcx: rustc_span::HashStableContext> HashStable<Hcx> for Path {
fn hash_stable(&self, hcx: &mut Hcx, hasher: &mut StableHasher) {
fn hash_stable(&self, hcx: &Hcx, hasher: &mut StableHasher) {
self.segments.len().hash_stable(hcx, hasher);
for segment in &self.segments {
segment.ident.hash_stable(hcx, hasher);
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast/src/tokenstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl<D: SpanDecoder> Decodable<D> for LazyAttrTokenStream {
}

impl<Hcx> HashStable<Hcx> for LazyAttrTokenStream {
fn hash_stable(&self, _hcx: &mut Hcx, _hasher: &mut StableHasher) {
fn hash_stable(&self, _hcx: &Hcx, _hasher: &mut StableHasher) {
panic!("Attempted to compute stable hash for LazyAttrTokenStream");
}
}
Expand Down Expand Up @@ -828,7 +828,7 @@ impl<Hcx> HashStable<Hcx> for TokenStream
where
Hcx: crate::HashStableContext,
{
fn hash_stable(&self, hcx: &mut Hcx, hasher: &mut StableHasher) {
fn hash_stable(&self, hcx: &Hcx, hasher: &mut StableHasher) {
for sub_tt in self.iter() {
sub_tt.hash_stable(hcx, hasher);
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,9 @@ fn compute_hir_hash(
.collect();
hir_body_nodes.sort_unstable_by_key(|bn| bn.0);

tcx.with_stable_hashing_context(|mut hcx| {
tcx.with_stable_hashing_context(|hcx| {
let mut stable_hasher = StableHasher::new();
hir_body_nodes.hash_stable(&mut hcx, &mut stable_hasher);
hir_body_nodes.hash_stable(&hcx, &mut stable_hasher);
stable_hasher.finish()
})
}
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 @@ -46,7 +46,7 @@ enum OngoingModuleCodegen {
}

impl<Hcx> HashStable<Hcx> for OngoingModuleCodegen {
fn hash_stable(&self, _: &mut Hcx, _: &mut StableHasher) {
fn hash_stable(&self, _: &Hcx, _: &mut StableHasher) {
// do nothing
}
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_llvm/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ impl<'ll, 'tcx> ConstCodegenMethods for CodegenCx<'ll, 'tcx> {
};
if !self.sess().fewer_names() && llvm::get_value_name(value).is_empty()
{
let hash = self.tcx.with_stable_hashing_context(|mut hcx| {
let hash = self.tcx.with_stable_hashing_context(|hcx| {
let mut hasher = StableHasher::new();
alloc.hash_stable(&mut hcx, &mut hasher);
alloc.hash_stable(&hcx, &mut hasher);
hasher.finish::<Hash128>()
});
llvm::set_value_name(
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 @@ -103,7 +103,7 @@ mod temp_stable_hash_impls {
use crate::ModuleCodegen;

impl<Hcx, M> HashStable<Hcx> for ModuleCodegen<M> {
fn hash_stable(&self, _: &mut Hcx, _: &mut StableHasher) {
fn hash_stable(&self, _: &Hcx, _: &mut StableHasher) {
// do nothing
}
}
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 @@ -107,7 +107,7 @@ impl<T, Hcx> HashStable<Hcx> for Interned<'_, T>
where
T: HashStable<Hcx>,
{
fn hash_stable(&self, hcx: &mut Hcx, hasher: &mut StableHasher) {
fn hash_stable(&self, hcx: &Hcx, hasher: &mut StableHasher) {
self.0.hash_stable(hcx, hasher);
}
}
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 @@ -62,7 +62,7 @@ impl fmt::UpperHex for Pu128 {

impl<Hcx> HashStable<Hcx> for Pu128 {
#[inline]
fn hash_stable(&self, hcx: &mut Hcx, hasher: &mut StableHasher) {
fn hash_stable(&self, hcx: &Hcx, hasher: &mut StableHasher) {
{ self.0 }.hash_stable(hcx, hasher)
}
}
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 @@ -349,7 +349,7 @@ impl<K: Ord, V> FromIterator<(K, V)> for SortedMap<K, V> {

impl<K: HashStable<Hcx> + StableOrd, V: HashStable<Hcx>, Hcx> HashStable<Hcx> for SortedMap<K, V> {
#[inline]
fn hash_stable(&self, hcx: &mut Hcx, hasher: &mut StableHasher) {
fn hash_stable(&self, hcx: &Hcx, hasher: &mut StableHasher) {
self.data.hash_stable(hcx, hasher);
}
}
Expand Down
Loading
Loading