@@ -139,6 +139,7 @@ impl<'tcx> SaveContext<'tcx> {
139139 pub fn get_extern_item_data ( & self , item : & hir:: ForeignItem < ' _ > ) -> Option < Data > {
140140 let def_id = item. def_id . to_def_id ( ) ;
141141 let qualname = format ! ( "::{}" , self . tcx. def_path_str( def_id) ) ;
142+ let attrs = self . tcx . hir ( ) . attrs ( item. hir_id ( ) ) ;
142143 match item. kind {
143144 hir:: ForeignItemKind :: Fn ( ref decl, arg_names, ref generics) => {
144145 filter ! ( self . span_utils, item. ident. span) ;
@@ -169,9 +170,9 @@ impl<'tcx> SaveContext<'tcx> {
169170 parent : None ,
170171 children : vec ! [ ] ,
171172 decl_id : None ,
172- docs : self . docs_for_attrs ( & item . attrs ) ,
173+ docs : self . docs_for_attrs ( attrs) ,
173174 sig : sig:: foreign_item_signature ( item, self ) ,
174- attributes : lower_attributes ( item . attrs . to_vec ( ) , self ) ,
175+ attributes : lower_attributes ( attrs. to_vec ( ) , self ) ,
175176 } ) )
176177 }
177178 hir:: ForeignItemKind :: Static ( ref ty, _) => {
@@ -190,9 +191,9 @@ impl<'tcx> SaveContext<'tcx> {
190191 parent : None ,
191192 children : vec ! [ ] ,
192193 decl_id : None ,
193- docs : self . docs_for_attrs ( & item . attrs ) ,
194+ docs : self . docs_for_attrs ( attrs) ,
194195 sig : sig:: foreign_item_signature ( item, self ) ,
195- attributes : lower_attributes ( item . attrs . to_vec ( ) , self ) ,
196+ attributes : lower_attributes ( attrs. to_vec ( ) , self ) ,
196197 } ) )
197198 }
198199 // FIXME(plietar): needs a new DefKind in rls-data
0 commit comments