@@ -114,7 +114,6 @@ macro_rules! define_dep_nodes {
114
114
115
115
impl DepKind {
116
116
#[ allow( unreachable_code) ]
117
- #[ inline]
118
117
pub fn can_reconstruct_query_key<$tcx>( & self ) -> bool {
119
118
match * self {
120
119
$(
@@ -150,7 +149,6 @@ macro_rules! define_dep_nodes {
150
149
}
151
150
}
152
151
153
- #[ inline( always) ]
154
152
pub fn is_eval_always( & self ) -> bool {
155
153
match * self {
156
154
$(
@@ -199,7 +197,6 @@ macro_rules! define_dep_nodes {
199
197
200
198
impl DepNode {
201
199
#[ allow( unreachable_code, non_snake_case) ]
202
- #[ inline( always) ]
203
200
pub fn new<' tcx>( tcx: TyCtxt <' tcx>,
204
201
dep: DepConstructor <' tcx>)
205
202
-> DepNode
@@ -219,14 +216,16 @@ macro_rules! define_dep_nodes {
219
216
hash
220
217
} ;
221
218
222
- if cfg!( debug_assertions) &&
223
- !dep_node. kind. can_reconstruct_query_key( ) &&
224
- ( tcx. sess. opts. debugging_opts. incremental_info ||
225
- tcx. sess. opts. debugging_opts. query_dep_graph)
219
+ #[ cfg( debug_assertions) ]
226
220
{
227
- tcx. dep_graph. register_dep_node_debug_str( dep_node, || {
228
- arg. to_debug_str( tcx)
229
- } ) ;
221
+ if !dep_node. kind. can_reconstruct_query_key( ) &&
222
+ ( tcx. sess. opts. debugging_opts. incremental_info ||
223
+ tcx. sess. opts. debugging_opts. query_dep_graph)
224
+ {
225
+ tcx. dep_graph. register_dep_node_debug_str( dep_node, || {
226
+ arg. to_debug_str( tcx)
227
+ } ) ;
228
+ }
230
229
}
231
230
232
231
return dep_node;
@@ -242,14 +241,16 @@ macro_rules! define_dep_nodes {
242
241
hash
243
242
} ;
244
243
245
- if cfg!( debug_assertions) &&
246
- !dep_node. kind. can_reconstruct_query_key( ) &&
247
- ( tcx. sess. opts. debugging_opts. incremental_info ||
248
- tcx. sess. opts. debugging_opts. query_dep_graph)
244
+ #[ cfg( debug_assertions) ]
249
245
{
250
- tcx. dep_graph. register_dep_node_debug_str( dep_node, || {
251
- tupled_args. to_debug_str( tcx)
252
- } ) ;
246
+ if !dep_node. kind. can_reconstruct_query_key( ) &&
247
+ ( tcx. sess. opts. debugging_opts. incremental_info ||
248
+ tcx. sess. opts. debugging_opts. query_dep_graph)
249
+ {
250
+ tcx. dep_graph. register_dep_node_debug_str( dep_node, || {
251
+ tupled_args. to_debug_str( tcx)
252
+ } ) ;
253
+ }
253
254
}
254
255
255
256
return dep_node;
@@ -267,7 +268,6 @@ macro_rules! define_dep_nodes {
267
268
/// Construct a DepNode from the given DepKind and DefPathHash. This
268
269
/// method will assert that the given DepKind actually requires a
269
270
/// single DefId/DefPathHash parameter.
270
- #[ inline( always) ]
271
271
pub fn from_def_path_hash( kind: DepKind ,
272
272
def_path_hash: DefPathHash )
273
273
-> DepNode {
@@ -281,7 +281,6 @@ macro_rules! define_dep_nodes {
281
281
/// Creates a new, parameterless DepNode. This method will assert
282
282
/// that the DepNode corresponding to the given DepKind actually
283
283
/// does not require any parameters.
284
- #[ inline( always) ]
285
284
pub fn new_no_params( kind: DepKind ) -> DepNode {
286
285
debug_assert!( !kind. has_params( ) ) ;
287
286
DepNode {
@@ -300,7 +299,6 @@ macro_rules! define_dep_nodes {
300
299
/// DepNode. Condition (2) might not be fulfilled if a DepNode
301
300
/// refers to something from the previous compilation session that
302
301
/// has been removed.
303
- #[ inline]
304
302
pub fn extract_def_id( & self , tcx: TyCtxt <' _>) -> Option <DefId > {
305
303
if self . kind. can_reconstruct_query_key( ) {
306
304
let def_path_hash = DefPathHash ( self . hash) ;
@@ -386,14 +384,12 @@ impl fmt::Debug for DepNode {
386
384
387
385
388
386
impl DefPathHash {
389
- #[ inline( always) ]
390
387
pub fn to_dep_node ( self , kind : DepKind ) -> DepNode {
391
388
DepNode :: from_def_path_hash ( kind, self )
392
389
}
393
390
}
394
391
395
392
impl DefId {
396
- #[ inline( always) ]
397
393
pub fn to_dep_node ( self , tcx : TyCtxt < ' _ > , kind : DepKind ) -> DepNode {
398
394
DepNode :: from_def_path_hash ( kind, tcx. def_path_hash ( self ) )
399
395
}
0 commit comments