File tree Expand file tree Collapse file tree 2 files changed +1
-31
lines changed
compiler/rustc_middle/src/ich Expand file tree Collapse file tree 2 files changed +1
-31
lines changed Original file line number Diff line number Diff line change 11use crate :: ich;
2- use crate :: ty:: TyCtxt ;
32use rustc_ast as ast;
43use rustc_data_structures:: fx:: FxHashSet ;
54use 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-
210180impl < ' 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" ) ;
Original file line number Diff line number Diff line change 11//! ICH - Incremental Compilation Hash
22
3- pub use self :: hcx:: { NodeIdHashingMode , StableHashingContext , StableHashingContextProvider } ;
3+ pub use self :: hcx:: { NodeIdHashingMode , StableHashingContext } ;
44use rustc_span:: symbol:: { sym, Symbol } ;
55
66mod hcx;
You can’t perform that action at this time.
0 commit comments