File tree 2 files changed +1
-31
lines changed
compiler/rustc_middle/src/ich
2 files changed +1
-31
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: ich;
2
- use crate :: ty:: TyCtxt ;
3
2
use rustc_ast as ast;
4
3
use rustc_data_structures:: fx:: FxHashSet ;
5
4
use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
@@ -178,35 +177,6 @@ impl<'a> StableHashingContext<'a> {
178
177
}
179
178
}
180
179
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
-
210
180
impl < ' a > HashStable < StableHashingContext < ' a > > for ast:: NodeId {
211
181
fn hash_stable ( & self , _: & mut StableHashingContext < ' a > , _: & mut StableHasher ) {
212
182
panic ! ( "Node IDs should not appear in incremental state" ) ;
Original file line number Diff line number Diff line change 1
1
//! ICH - Incremental Compilation Hash
2
2
3
- pub use self :: hcx:: { NodeIdHashingMode , StableHashingContext , StableHashingContextProvider } ;
3
+ pub use self :: hcx:: { NodeIdHashingMode , StableHashingContext } ;
4
4
use rustc_span:: symbol:: { sym, Symbol } ;
5
5
6
6
mod hcx;
You can’t perform that action at this time.
0 commit comments