@@ -61,18 +61,18 @@ impl<K: DepKind> DepNode<K> {
61
61
/// Creates a new, parameterless DepNode. This method will assert
62
62
/// that the DepNode corresponding to the given DepKind actually
63
63
/// does not require any parameters.
64
- pub fn new_no_params < Ctxt > ( tcx : Ctxt , kind : K ) -> DepNode < K >
64
+ pub fn new_no_params < Tcx > ( tcx : Tcx , kind : K ) -> DepNode < K >
65
65
where
66
- Ctxt : super :: DepContext < DepKind = K > ,
66
+ Tcx : super :: DepContext < DepKind = K > ,
67
67
{
68
68
debug_assert_eq ! ( tcx. fingerprint_style( kind) , FingerprintStyle :: Unit ) ;
69
69
DepNode { kind, hash : Fingerprint :: ZERO . into ( ) }
70
70
}
71
71
72
- pub fn construct < Ctxt , Key > ( tcx : Ctxt , kind : K , arg : & Key ) -> DepNode < K >
72
+ pub fn construct < Tcx , Key > ( tcx : Tcx , kind : K , arg : & Key ) -> DepNode < K >
73
73
where
74
- Ctxt : super :: DepContext < DepKind = K > ,
75
- Key : DepNodeParams < Ctxt > ,
74
+ Tcx : super :: DepContext < DepKind = K > ,
75
+ Key : DepNodeParams < Tcx > ,
76
76
{
77
77
let hash = arg. to_fingerprint ( tcx) ;
78
78
let dep_node = DepNode { kind, hash : hash. into ( ) } ;
@@ -93,9 +93,9 @@ impl<K: DepKind> DepNode<K> {
93
93
/// Construct a DepNode from the given DepKind and DefPathHash. This
94
94
/// method will assert that the given DepKind actually requires a
95
95
/// single DefId/DefPathHash parameter.
96
- pub fn from_def_path_hash < Ctxt > ( tcx : Ctxt , def_path_hash : DefPathHash , kind : K ) -> Self
96
+ pub fn from_def_path_hash < Tcx > ( tcx : Tcx , def_path_hash : DefPathHash , kind : K ) -> Self
97
97
where
98
- Ctxt : super :: DepContext < DepKind = K > ,
98
+ Tcx : super :: DepContext < DepKind = K > ,
99
99
{
100
100
debug_assert ! ( tcx. fingerprint_style( kind) == FingerprintStyle :: DefPathHash ) ;
101
101
DepNode { kind, hash : def_path_hash. 0 . into ( ) }
@@ -108,18 +108,18 @@ impl<K: DepKind> fmt::Debug for DepNode<K> {
108
108
}
109
109
}
110
110
111
- pub trait DepNodeParams < Ctxt : DepContext > : fmt:: Debug + Sized {
111
+ pub trait DepNodeParams < Tcx : DepContext > : fmt:: Debug + Sized {
112
112
fn fingerprint_style ( ) -> FingerprintStyle ;
113
113
114
114
/// This method turns the parameters of a DepNodeConstructor into an opaque
115
115
/// Fingerprint to be used in DepNode.
116
116
/// Not all DepNodeParams support being turned into a Fingerprint (they
117
117
/// don't need to if the corresponding DepNode is anonymous).
118
- fn to_fingerprint ( & self , _: Ctxt ) -> Fingerprint {
118
+ fn to_fingerprint ( & self , _: Tcx ) -> Fingerprint {
119
119
panic ! ( "Not implemented. Accidentally called on anonymous node?" )
120
120
}
121
121
122
- fn to_debug_str ( & self , _: Ctxt ) -> String {
122
+ fn to_debug_str ( & self , _: Tcx ) -> String {
123
123
format ! ( "{:?}" , self )
124
124
}
125
125
@@ -129,10 +129,10 @@ pub trait DepNodeParams<Ctxt: DepContext>: fmt::Debug + Sized {
129
129
/// `fingerprint_style()` is not `FingerprintStyle::Opaque`.
130
130
/// It is always valid to return `None` here, in which case incremental
131
131
/// compilation will treat the query as having changed instead of forcing it.
132
- fn recover ( tcx : Ctxt , dep_node : & DepNode < Ctxt :: DepKind > ) -> Option < Self > ;
132
+ fn recover ( tcx : Tcx , dep_node : & DepNode < Tcx :: DepKind > ) -> Option < Self > ;
133
133
}
134
134
135
- impl < Ctxt : DepContext , T > DepNodeParams < Ctxt > for T
135
+ impl < Tcx : DepContext , T > DepNodeParams < Tcx > for T
136
136
where
137
137
T : for < ' a > HashStable < StableHashingContext < ' a > > + fmt:: Debug ,
138
138
{
@@ -142,7 +142,7 @@ where
142
142
}
143
143
144
144
#[ inline( always) ]
145
- default fn to_fingerprint ( & self , tcx : Ctxt ) -> Fingerprint {
145
+ default fn to_fingerprint ( & self , tcx : Tcx ) -> Fingerprint {
146
146
tcx. with_stable_hashing_context ( |mut hcx| {
147
147
let mut hasher = StableHasher :: new ( ) ;
148
148
self . hash_stable ( & mut hcx, & mut hasher) ;
@@ -151,12 +151,12 @@ where
151
151
}
152
152
153
153
#[ inline( always) ]
154
- default fn to_debug_str ( & self , _: Ctxt ) -> String {
154
+ default fn to_debug_str ( & self , _: Tcx ) -> String {
155
155
format ! ( "{:?}" , * self )
156
156
}
157
157
158
158
#[ inline( always) ]
159
- default fn recover ( _: Ctxt , _: & DepNode < Ctxt :: DepKind > ) -> Option < Self > {
159
+ default fn recover ( _: Tcx , _: & DepNode < Tcx :: DepKind > ) -> Option < Self > {
160
160
None
161
161
}
162
162
}
@@ -166,7 +166,7 @@ where
166
166
/// Information is retrieved by indexing the `DEP_KINDS` array using the integer value
167
167
/// of the `DepKind`. Overall, this allows to implement `DepContext` using this manual
168
168
/// jump table instead of large matches.
169
- pub struct DepKindStruct < CTX : DepContext > {
169
+ pub struct DepKindStruct < Tcx : DepContext > {
170
170
/// Anonymous queries cannot be replayed from one compiler invocation to the next.
171
171
/// When their result is needed, it is recomputed. They are useful for fine-grained
172
172
/// dependency tracking, and caching within one compiler invocation.
@@ -216,10 +216,10 @@ pub struct DepKindStruct<CTX: DepContext> {
216
216
/// with kind `MirValidated`, we know that the GUID/fingerprint of the `DepNode`
217
217
/// is actually a `DefPathHash`, and can therefore just look up the corresponding
218
218
/// `DefId` in `tcx.def_path_hash_to_def_id`.
219
- pub force_from_dep_node : Option < fn ( tcx : CTX , dep_node : DepNode < CTX :: DepKind > ) -> bool > ,
219
+ pub force_from_dep_node : Option < fn ( tcx : Tcx , dep_node : DepNode < Tcx :: DepKind > ) -> bool > ,
220
220
221
221
/// Invoke a query to put the on-disk cached value in memory.
222
- pub try_load_from_on_disk_cache : Option < fn ( CTX , DepNode < CTX :: DepKind > ) > ,
222
+ pub try_load_from_on_disk_cache : Option < fn ( Tcx , DepNode < Tcx :: DepKind > ) > ,
223
223
}
224
224
225
225
/// A "work product" corresponds to a `.o` (or other) file that we
0 commit comments