Skip to content

Commit 2d38c53

Browse files
committed
Remove StableHashProvider.
1 parent 8961616 commit 2d38c53

File tree

2 files changed

+1
-31
lines changed

2 files changed

+1
-31
lines changed

compiler/rustc_middle/src/ich/hcx.rs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use crate::ich;
2-
use crate::ty::TyCtxt;
32
use rustc_ast as ast;
43
use rustc_data_structures::fx::FxHashSet;
54
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
@@ -178,35 +177,6 @@ impl<'a> StableHashingContext<'a> {
178177
}
179178
}
180179

181-
/// Something that can provide a stable hashing context.
182-
pub trait StableHashingContextProvider<'a> {
183-
fn get_stable_hashing_context(&self) -> StableHashingContext<'a>;
184-
}
185-
186-
impl<'a, 'b, T: StableHashingContextProvider<'a>> StableHashingContextProvider<'a> for &'b T {
187-
fn get_stable_hashing_context(&self) -> StableHashingContext<'a> {
188-
(**self).get_stable_hashing_context()
189-
}
190-
}
191-
192-
impl<'a, 'b, T: StableHashingContextProvider<'a>> StableHashingContextProvider<'a> for &'b mut T {
193-
fn get_stable_hashing_context(&self) -> StableHashingContext<'a> {
194-
(**self).get_stable_hashing_context()
195-
}
196-
}
197-
198-
impl StableHashingContextProvider<'tcx> for TyCtxt<'tcx> {
199-
fn get_stable_hashing_context(&self) -> StableHashingContext<'tcx> {
200-
(*self).create_stable_hashing_context()
201-
}
202-
}
203-
204-
impl<'a> StableHashingContextProvider<'a> for StableHashingContext<'a> {
205-
fn get_stable_hashing_context(&self) -> StableHashingContext<'a> {
206-
self.clone()
207-
}
208-
}
209-
210180
impl<'a> HashStable<StableHashingContext<'a>> for ast::NodeId {
211181
fn hash_stable(&self, _: &mut StableHashingContext<'a>, _: &mut StableHasher) {
212182
panic!("Node IDs should not appear in incremental state");

compiler/rustc_middle/src/ich/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! ICH - Incremental Compilation Hash
22
3-
pub use self::hcx::{NodeIdHashingMode, StableHashingContext, StableHashingContextProvider};
3+
pub use self::hcx::{NodeIdHashingMode, StableHashingContext};
44
use rustc_span::symbol::{sym, Symbol};
55

66
mod hcx;

0 commit comments

Comments
 (0)