@@ -329,52 +329,46 @@ impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for HirId {
329
329
}
330
330
}
331
331
332
- macro_rules! impl_for_typed_def_id {
333
- ( $Name: ident, $LocalName: ident) => {
334
- impl <' tcx> DepNodeParams <TyCtxt <' tcx>> for $Name {
335
- #[ inline( always) ]
336
- fn fingerprint_style( ) -> FingerprintStyle {
337
- FingerprintStyle :: DefPathHash
338
- }
332
+ impl < ' tcx > DepNodeParams < TyCtxt < ' tcx > > for ModDefId {
333
+ #[ inline( always) ]
334
+ fn fingerprint_style ( ) -> FingerprintStyle {
335
+ FingerprintStyle :: DefPathHash
336
+ }
339
337
340
- #[ inline( always) ]
341
- fn to_fingerprint( & self , tcx: TyCtxt <' tcx>) -> Fingerprint {
342
- self . to_def_id( ) . to_fingerprint( tcx)
343
- }
338
+ #[ inline( always) ]
339
+ fn to_fingerprint ( & self , tcx : TyCtxt < ' tcx > ) -> Fingerprint {
340
+ self . to_def_id ( ) . to_fingerprint ( tcx)
341
+ }
344
342
345
- #[ inline( always) ]
346
- fn to_debug_str( & self , tcx: TyCtxt <' tcx>) -> String {
347
- self . to_def_id( ) . to_debug_str( tcx)
348
- }
343
+ #[ inline( always) ]
344
+ fn to_debug_str ( & self , tcx : TyCtxt < ' tcx > ) -> String {
345
+ self . to_def_id ( ) . to_debug_str ( tcx)
346
+ }
349
347
350
- #[ inline( always) ]
351
- fn recover( tcx: TyCtxt <' tcx>, dep_node: & DepNode ) -> Option <Self > {
352
- DefId :: recover( tcx, dep_node) . map( $Name :: new_unchecked)
353
- }
354
- }
348
+ #[ inline( always) ]
349
+ fn recover ( tcx : TyCtxt < ' tcx > , dep_node : & DepNode ) -> Option < Self > {
350
+ DefId :: recover ( tcx, dep_node) . map ( ModDefId :: new_unchecked)
351
+ }
352
+ }
355
353
356
- impl <' tcx> DepNodeParams <TyCtxt <' tcx>> for $LocalName {
357
- #[ inline( always) ]
358
- fn fingerprint_style( ) -> FingerprintStyle {
359
- FingerprintStyle :: DefPathHash
360
- }
354
+ impl < ' tcx > DepNodeParams < TyCtxt < ' tcx > > for LocalModDefId {
355
+ #[ inline( always) ]
356
+ fn fingerprint_style ( ) -> FingerprintStyle {
357
+ FingerprintStyle :: DefPathHash
358
+ }
361
359
362
- #[ inline( always) ]
363
- fn to_fingerprint( & self , tcx: TyCtxt <' tcx>) -> Fingerprint {
364
- self . to_def_id( ) . to_fingerprint( tcx)
365
- }
360
+ #[ inline( always) ]
361
+ fn to_fingerprint ( & self , tcx : TyCtxt < ' tcx > ) -> Fingerprint {
362
+ self . to_def_id ( ) . to_fingerprint ( tcx)
363
+ }
366
364
367
- #[ inline( always) ]
368
- fn to_debug_str( & self , tcx: TyCtxt <' tcx>) -> String {
369
- self . to_def_id( ) . to_debug_str( tcx)
370
- }
365
+ #[ inline( always) ]
366
+ fn to_debug_str ( & self , tcx : TyCtxt < ' tcx > ) -> String {
367
+ self . to_def_id ( ) . to_debug_str ( tcx)
368
+ }
371
369
372
- #[ inline( always) ]
373
- fn recover( tcx: TyCtxt <' tcx>, dep_node: & DepNode ) -> Option <Self > {
374
- LocalDefId :: recover( tcx, dep_node) . map( $LocalName:: new_unchecked)
375
- }
376
- }
377
- } ;
370
+ #[ inline( always) ]
371
+ fn recover ( tcx : TyCtxt < ' tcx > , dep_node : & DepNode ) -> Option < Self > {
372
+ LocalDefId :: recover ( tcx, dep_node) . map ( LocalModDefId :: new_unchecked)
373
+ }
378
374
}
379
-
380
- impl_for_typed_def_id ! { ModDefId , LocalModDefId }
0 commit comments