@@ -253,10 +253,9 @@ trait HirPrinterSupport<'hir>: pprust_hir::PpAnn {
253
253
fn pp_ann < ' a > ( & ' a self ) -> & ' a dyn pprust_hir:: PpAnn ;
254
254
255
255
/// Computes an user-readable representation of a path, if possible.
256
- fn node_path ( & self , id : ast :: NodeId ) -> Option < String > {
256
+ fn node_path ( & self , id : hir :: HirId ) -> Option < String > {
257
257
self . hir_map ( ) . and_then ( |map| {
258
- let hir_id = map. node_to_hir_id ( id) ;
259
- map. def_path_from_hir_id ( hir_id)
258
+ map. def_path_from_hir_id ( id)
260
259
} ) . map ( |path| {
261
260
path. data
262
261
. into_iter ( )
@@ -471,8 +470,8 @@ impl<'b, 'tcx> HirPrinterSupport<'tcx> for TypedAnnotation<'b, 'tcx> {
471
470
self
472
471
}
473
472
474
- fn node_path ( & self , id : ast :: NodeId ) -> Option < String > {
475
- Some ( self . tcx . def_path_str ( self . tcx . hir ( ) . local_def_id ( id) ) )
473
+ fn node_path ( & self , id : hir :: HirId ) -> Option < String > {
474
+ Some ( self . tcx . def_path_str ( self . tcx . hir ( ) . local_def_id_from_hir_id ( id) ) )
476
475
}
477
476
}
478
477
@@ -834,7 +833,7 @@ pub fn print_after_hir_lowering<'tcx>(
834
833
let node = hir_map. get ( hir_id) ;
835
834
pp_state. print_node ( node) ?;
836
835
pp_state. s . space ( ) ?;
837
- let path = annotation. node_path ( node_id )
836
+ let path = annotation. node_path ( hir_id )
838
837
. expect ( "-Z unpretty missing node paths" ) ;
839
838
pp_state. synth_comment ( path) ?;
840
839
pp_state. s . hardbreak ( ) ?;
0 commit comments