@@ -308,10 +308,12 @@ impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for () {
308
308
FingerprintStyle :: Unit
309
309
}
310
310
311
+ #[ inline( always) ]
311
312
fn to_fingerprint ( & self , _: TyCtxt < ' tcx > ) -> Fingerprint {
312
313
Fingerprint :: ZERO
313
314
}
314
315
316
+ #[ inline( always) ]
315
317
fn recover ( _: TyCtxt < ' tcx > , _: & DepNode ) -> Option < Self > {
316
318
Some ( ( ) )
317
319
}
@@ -323,14 +325,17 @@ impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for DefId {
323
325
FingerprintStyle :: DefPathHash
324
326
}
325
327
328
+ #[ inline( always) ]
326
329
fn to_fingerprint ( & self , tcx : TyCtxt < ' tcx > ) -> Fingerprint {
327
330
tcx. def_path_hash ( * self ) . 0
328
331
}
329
332
333
+ #[ inline( always) ]
330
334
fn to_debug_str ( & self , tcx : TyCtxt < ' tcx > ) -> String {
331
335
tcx. def_path_str ( * self )
332
336
}
333
337
338
+ #[ inline( always) ]
334
339
fn recover ( tcx : TyCtxt < ' tcx > , dep_node : & DepNode ) -> Option < Self > {
335
340
dep_node. extract_def_id ( tcx)
336
341
}
@@ -342,14 +347,17 @@ impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for LocalDefId {
342
347
FingerprintStyle :: DefPathHash
343
348
}
344
349
350
+ #[ inline( always) ]
345
351
fn to_fingerprint ( & self , tcx : TyCtxt < ' tcx > ) -> Fingerprint {
346
352
self . to_def_id ( ) . to_fingerprint ( tcx)
347
353
}
348
354
355
+ #[ inline( always) ]
349
356
fn to_debug_str ( & self , tcx : TyCtxt < ' tcx > ) -> String {
350
357
self . to_def_id ( ) . to_debug_str ( tcx)
351
358
}
352
359
360
+ #[ inline( always) ]
353
361
fn recover ( tcx : TyCtxt < ' tcx > , dep_node : & DepNode ) -> Option < Self > {
354
362
dep_node. extract_def_id ( tcx) . map ( |id| id. expect_local ( ) )
355
363
}
@@ -361,15 +369,18 @@ impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for CrateNum {
361
369
FingerprintStyle :: DefPathHash
362
370
}
363
371
372
+ #[ inline( always) ]
364
373
fn to_fingerprint ( & self , tcx : TyCtxt < ' tcx > ) -> Fingerprint {
365
374
let def_id = DefId { krate : * self , index : CRATE_DEF_INDEX } ;
366
375
def_id. to_fingerprint ( tcx)
367
376
}
368
377
378
+ #[ inline( always) ]
369
379
fn to_debug_str ( & self , tcx : TyCtxt < ' tcx > ) -> String {
370
380
tcx. crate_name ( * self ) . to_string ( )
371
381
}
372
382
383
+ #[ inline( always) ]
373
384
fn recover ( tcx : TyCtxt < ' tcx > , dep_node : & DepNode ) -> Option < Self > {
374
385
dep_node. extract_def_id ( tcx) . map ( |id| id. krate )
375
386
}
@@ -384,6 +395,7 @@ impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for (DefId, DefId) {
384
395
// We actually would not need to specialize the implementation of this
385
396
// method but it's faster to combine the hashes than to instantiate a full
386
397
// hashing context and stable-hashing state.
398
+ #[ inline( always) ]
387
399
fn to_fingerprint ( & self , tcx : TyCtxt < ' tcx > ) -> Fingerprint {
388
400
let ( def_id_0, def_id_1) = * self ;
389
401
@@ -393,6 +405,7 @@ impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for (DefId, DefId) {
393
405
def_path_hash_0. 0 . combine ( def_path_hash_1. 0 )
394
406
}
395
407
408
+ #[ inline( always) ]
396
409
fn to_debug_str ( & self , tcx : TyCtxt < ' tcx > ) -> String {
397
410
let ( def_id_0, def_id_1) = * self ;
398
411
@@ -409,6 +422,7 @@ impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for HirId {
409
422
// We actually would not need to specialize the implementation of this
410
423
// method but it's faster to combine the hashes than to instantiate a full
411
424
// hashing context and stable-hashing state.
425
+ #[ inline( always) ]
412
426
fn to_fingerprint ( & self , tcx : TyCtxt < ' tcx > ) -> Fingerprint {
413
427
let HirId { owner, local_id } = * self ;
414
428
0 commit comments