This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -796,7 +796,6 @@ impl<'tcx> AttributeMap<'tcx> {
796796/// Map of all HIR nodes inside the current owner.
797797/// These nodes are mapped by `ItemLocalId` alongside the index of their parent node.
798798/// The HIR tree, including bodies, is pre-hashed.
799- #[ derive( Debug ) ]
800799pub struct OwnerNodes < ' tcx > {
801800 /// Pre-computed hash of the full HIR.
802801 pub hash_including_bodies : Fingerprint ,
@@ -822,6 +821,18 @@ impl<'tcx> OwnerNodes<'tcx> {
822821 }
823822}
824823
824+ impl fmt:: Debug for OwnerNodes < ' _ > {
825+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
826+ f. debug_struct ( "OwnerNodes" )
827+ . field ( "node" , & self . nodes [ ItemLocalId :: from_u32 ( 0 ) ] )
828+ . field ( "bodies" , & self . bodies )
829+ . field ( "local_id_to_def_id" , & self . local_id_to_def_id )
830+ . field ( "hash_without_bodies" , & self . hash_without_bodies )
831+ . field ( "hash_including_bodies" , & self . hash_including_bodies )
832+ . finish ( )
833+ }
834+ }
835+
825836/// Full information resulting from lowering an AST node.
826837#[ derive( Debug , HashStable_Generic ) ]
827838pub struct OwnerInfo < ' hir > {
You can’t perform that action at this time.
0 commit comments