@@ -554,6 +554,7 @@ impl<'tcx> DumpVisitor<'tcx> {
554554 let span = self . span_from_span ( name_span) ;
555555 let id = id_from_hir_id ( variant. id , & self . save_ctxt ) ;
556556 let parent = Some ( id_from_def_id ( item. def_id . to_def_id ( ) ) ) ;
557+ let attrs = self . tcx . hir ( ) . attrs ( variant. id ) ;
557558
558559 self . dumper . dump_def (
559560 & access,
@@ -567,12 +568,9 @@ impl<'tcx> DumpVisitor<'tcx> {
567568 parent,
568569 children : vec ! [ ] ,
569570 decl_id : None ,
570- docs : self . save_ctxt . docs_for_attrs ( & variant . attrs ) ,
571+ docs : self . save_ctxt . docs_for_attrs ( attrs) ,
571572 sig : sig:: variant_signature ( variant, & self . save_ctxt ) ,
572- attributes : lower_attributes (
573- variant. attrs . to_vec ( ) ,
574- & self . save_ctxt ,
575- ) ,
573+ attributes : lower_attributes ( attrs. to_vec ( ) , & self . save_ctxt ) ,
576574 } ,
577575 ) ;
578576 }
@@ -594,6 +592,7 @@ impl<'tcx> DumpVisitor<'tcx> {
594592 let span = self . span_from_span ( name_span) ;
595593 let id = id_from_hir_id ( variant. id , & self . save_ctxt ) ;
596594 let parent = Some ( id_from_def_id ( item. def_id . to_def_id ( ) ) ) ;
595+ let attrs = self . tcx . hir ( ) . attrs ( variant. id ) ;
597596
598597 self . dumper . dump_def (
599598 & access,
@@ -607,12 +606,9 @@ impl<'tcx> DumpVisitor<'tcx> {
607606 parent,
608607 children : vec ! [ ] ,
609608 decl_id : None ,
610- docs : self . save_ctxt . docs_for_attrs ( & variant . attrs ) ,
609+ docs : self . save_ctxt . docs_for_attrs ( attrs) ,
611610 sig : sig:: variant_signature ( variant, & self . save_ctxt ) ,
612- attributes : lower_attributes (
613- variant. attrs . to_vec ( ) ,
614- & self . save_ctxt ,
615- ) ,
611+ attributes : lower_attributes ( attrs. to_vec ( ) , & self . save_ctxt ) ,
616612 } ,
617613 ) ;
618614 }
0 commit comments