File tree Expand file tree Collapse file tree 2 files changed +11
-14
lines changed
compiler/rustc_query_system/src/ich Expand file tree Collapse file tree 2 files changed +11
-14
lines changed Original file line number Diff line number Diff line change 1- use rustc_ast as ast;
2- use rustc_data_structures:: stable_hasher:: { HashStable , HashingControls , StableHasher } ;
1+ use rustc_data_structures:: stable_hasher:: HashingControls ;
32use rustc_hir:: def_id:: { DefId , LocalDefId } ;
43use rustc_hir:: definitions:: DefPathHash ;
54use rustc_session:: Session ;
@@ -67,13 +66,6 @@ impl<'a> StableHashingContext<'a> {
6766 }
6867}
6968
70- impl < ' a > HashStable < StableHashingContext < ' a > > for ast:: NodeId {
71- #[ inline]
72- fn hash_stable ( & self , _: & mut StableHashingContext < ' a > , _: & mut StableHasher ) {
73- panic ! ( "Node IDs should not appear in incremental state" ) ;
74- }
75- }
76-
7769impl < ' a > rustc_span:: HashStableContext for StableHashingContext < ' a > {
7870 #[ inline]
7971 fn unstable_opts_incremental_ignore_spans ( & self ) -> bool {
@@ -108,4 +100,7 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> {
108100 }
109101}
110102
103+ impl < ' a > rustc_abi:: HashStableContext for StableHashingContext < ' a > { }
104+ impl < ' a > rustc_ast:: HashStableContext for StableHashingContext < ' a > { }
105+ impl < ' a > rustc_hir:: HashStableContext for StableHashingContext < ' a > { }
111106impl < ' a > rustc_session:: HashStableContext for StableHashingContext < ' a > { }
Original file line number Diff line number Diff line change 22//! from various crates in no particular order.
33
44use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
5- use rustc_hir:: { self as hir, HashIgnoredAttrId } ;
65use rustc_span:: { SourceFile , Symbol , sym} ;
76use smallvec:: SmallVec ;
7+ use { rustc_ast as ast, rustc_hir as hir} ;
88
99use crate :: ich:: StableHashingContext ;
1010
11- impl < ' ctx > rustc_abi:: HashStableContext for StableHashingContext < ' ctx > { }
12- impl < ' ctx > rustc_ast:: HashStableContext for StableHashingContext < ' ctx > { }
11+ impl < ' a > HashStable < StableHashingContext < ' a > > for ast:: NodeId {
12+ #[ inline]
13+ fn hash_stable ( & self , _: & mut StableHashingContext < ' a > , _: & mut StableHasher ) {
14+ panic ! ( "Node IDs should not appear in incremental state" ) ;
15+ }
16+ }
1317
1418impl < ' a > HashStable < StableHashingContext < ' a > > for [ hir:: Attribute ] {
1519 fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
@@ -49,8 +53,6 @@ fn is_ignored_attr(name: Symbol) -> bool {
4953 IGNORED_ATTRIBUTES . contains ( & name)
5054}
5155
52- impl < ' ctx > rustc_hir:: HashStableContext for StableHashingContext < ' ctx > { }
53-
5456impl < ' a > HashStable < StableHashingContext < ' a > > for SourceFile {
5557 fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
5658 let SourceFile {
You can’t perform that action at this time.
0 commit comments